Dmitry Stogov
316aaca155
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed wrong condition
2017-05-31 00:40:57 +03:00
Dmitry Stogov
77cbf8a657
Fixed wrong condition
2017-05-31 00:40:33 +03:00
Xinchen Hui
0a27a5ba8c
Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
...
* 'PHP-7.1' of git.php.net:/php-src:
Fix loop identification
2017-04-17 20:27:07 +08:00
Xinchen Hui
d6315c2fbb
Fixed bug #74456 (Segmentation error while running a script in CLI mode)
...
Instead of make update_op1_by_const supports FETCH_LIST(CASE), I think
disable it is more safe for 7.1
2017-04-17 20:24:39 +08:00
Nikita Popov
abf16c18c7
Fix loop identification
...
When assigning loop headers, we should treat already detected
loops as collapsed to their loop header, instead of ignoring them.
This fixes the loop header of BB2 in mandel2 if live-range CFG
splitting is enabled.
2017-04-17 12:17:32 +02:00
Nikita Popov
00c6ce0e00
Merge branch 'PHP-7.0' into PHP-7.1
2017-04-15 12:35:53 +02:00
Nikita Popov
0beccc51f1
Fix compact_literals of INIT_METHOD_CALL with CONST op1
2017-04-15 12:35:09 +02:00
Nikita Popov
6c2222796b
Improve fix for bug #74442
...
Make the check less conservative to be consistent with the other
cases.
2017-04-15 01:39:33 +02:00
Nikita Popov
2f22dffd1a
Fixed bug #74442
2017-04-14 22:20:32 +02:00
Nikita Popov
3ffe2cd251
Fixed bug #74431
...
If the last instruction in a block is a NOP, then `new_opline`
here won't be a copy of `opline`, it will be a copy of the last
non-NOP opline. Avoid performing a spurious update by explicitly
checking for NOP.
2017-04-14 22:03:06 +02:00
Nikita Popov
1df3099f2f
Merge branch 'PHP-7.0' into PHP-7.1
2017-04-10 22:11:47 +02:00
Nikita Popov
6f950e83eb
Fix JMPZ+JMP => NOP+JMP optimization
2017-04-10 22:09:34 +02:00
Xinchen Hui
e656455eae
Remove unused var
2017-04-07 15:21:19 +08:00
Nikita Popov
d6f70f0ee3
Disable block pass for large functions
...
(Backport of 7ea261685f to 7.0.)
2017-03-28 22:07:37 +02:00
Nikita Popov
7ea261685f
Disable block pass for large functions
...
This is the last fix for bug #74250 .
2017-03-17 12:49:20 +01:00
Sebastian Bergmann
ccc35d1903
Fugbix typo
2017-03-16 19:10:07 +01:00
Nikita Popov
052aa466e1
Further optimize worklist management
...
Instead of always popping the first elements, do multiple complete
iterations of the worklist until it is empty.
2017-03-16 18:11:27 +01:00
Nikita Popov
e60515f3b8
Slightly optimize worklist management
...
Avoid scanning the worklist twice on every iteration.
2017-03-16 17:32:27 +01:00
Nikita Popov
f1f68b60f5
Optimize DJ spanning tree back-edge check
...
Instead of walking the DJ spanning tree upwards, record entry and
exit times during the DFS and use these to determine whether CJ
edges are sp-back edges.
2017-03-16 17:26:20 +01:00
Nikita Popov
6633e8492e
Sort blocks in loop identification
...
The previous implementation was doing O(blocks*levels) iterations,
which for a linear-ish domtree is O(blocks^2). Avoid this by sorting
the blocks by decreasing level upfront.
2017-03-16 16:49:36 +01:00
Nikita Popov
9331be7d6a
Use call_map to avoid linear call lookup
2017-03-16 12:33:57 +01:00
Dmitry Stogov
d9231b1667
Fixed pointer allignment
2017-03-07 10:18:34 +03:00
Dmitry Stogov
b273a8cbe4
Ensure pointer alignment.
2017-03-07 09:48:18 +03:00
Xinchen Hui
330a7b62c3
Fixed bug #74152 (if statement says true to a null variable)
2017-02-23 12:33:17 +08:00
Xinchen Hui
0b7fa040e9
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #74019 (Segfault with list)
2017-02-10 14:25:29 +08:00
Xinchen Hui
185304a61e
Fixed bug #74019 (Segfault with list)
2017-02-10 14:24:01 +08:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Nikita Popov
242d924e59
Fix bug #73847
2016-12-31 13:33:21 +01:00
Xinchen Hui
82988d3e41
Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)
...
This reverts commit a12f43ee2c .
2016-12-21 14:24:14 +08:00
Xinchen Hui
6bd41a1d47
Fixed bug #73789 (Strange behavior of class constants in switch/case block)
2016-12-20 21:01:21 +08:00
Xinchen Hui
a12f43ee2c
Reorder the oplines
...
1. we should only do the return type checking when it is really about to
return
2. for 029.php, actually, the exception threw should be discard while it
jmp into finally(it could be observed by change the return to return an array)
3. after this fix, the test 029.phpt behavior consistently with 7.0
4. good for optimizer too
2016-12-17 20:06:18 +08:00
Xinchen Hui
8ba7878f1b
Add an assertion
2016-12-16 11:09:22 +08:00
Xinchen Hui
7cef66c635
Fixed bug #73746 (Method that returns string returns UNKNOWN:0 instead)
2016-12-16 11:06:27 +08:00
Xinchen Hui
8250b3fca1
Fixed possible false assertion failure
2016-12-08 22:04:43 +08:00
Nikita Popov
60249f4390
Fix propagation of QM_ASSIGN into VERIFY_RETURN_TYPE
...
VERIFY_RETURN_TYPE uses different formats for the CONST/non-CONST
cases. If we progate a CONST operand into op1, op1 should be
moved to result.
2016-12-07 23:14:46 +01:00
Nikita Popov
76c4a3db08
Fix bug #73668
...
Not bothering to implement special handling to get an accurate
range for this case.
2016-12-06 22:25:35 +01:00
Nikita Popov
d7e7f74b24
Factor out common binary op code in range inference
...
Instead of repeating the same code for binary ops and their
compound assignment variants, factor the range computation out
into a separate function.
2016-12-06 22:09:44 +01:00
Nikita Popov
3b79f8f408
Fix bug #73654
2016-12-05 20:41:14 +01:00
Dmitry Stogov
54244ba565
Fixed access to uninitialized value
2016-12-01 13:25:50 +03:00
Xinchen Hui
a0b28434cc
Fixed bug #73583 (Segfaults when conditionally declared class and function have the same name)
...
bug was introduced in rev 88eae43f , and the runtime defined key is not
merged-able
2016-11-23 14:24:46 +08:00
Nikita Popov
226b82b127
RC inference fixes
2016-11-17 13:47:36 +01:00
Dmitry Stogov
f8f35d0d4e
VERIFY_RETURN_TYPE on references can't be eliminated
2016-11-17 10:41:42 +03:00
Dmitry Stogov
a04d9e0f1b
Fixed type ingference
2016-11-16 20:49:00 +03:00
Nikita Popov
5f4f83220a
Don't inline if function has ref arguments
...
Otherwise we end up leaving opcodes like FETCH_DIM_W behind. The
test case demonstrates a leak in particular.
2016-11-12 18:49:41 +01:00
Nikita Popov
3c8beb16c4
Allow early-binding of ZEND_NEW args
2016-11-10 22:52:15 +01:00
Nikita Popov
8106c01afc
Fix block pass leaks
2016-11-10 22:28:32 +01:00
Nikita Popov
62af7e0db8
Merge branch 'PHP-7.0' into PHP-7.1
2016-11-10 22:19:48 +01:00
Nikita Popov
bb3d0c0e17
Fcall optimization: Avoid FETCH_DIM_R with UNUSED op2
2016-11-10 21:36:46 +01:00
Nikita Popov
3048428cf0
Don't elide undef var notice
2016-11-10 14:58:54 +01:00