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
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
Nikita Popov
4f76073b6d
Set result of FREE to unused in block pass
2016-11-10 14:55:52 +01:00
Nikita Popov
570e7fa331
Fix ext/xml func info
2016-11-10 14:55:50 +01:00
Nikita Popov
0378121c64
Range inference cleanup
...
Replace inline #ifdefs with some macros. Fix build if NEG_RANGE is
disabled. Fix some typos. Add some comments.
2016-11-10 14:55:40 +01:00
Dmitry Stogov
a5458e7e8e
Fixed reference-counter inference
2016-11-01 19:04:10 +03:00
Dmitry Stogov
e88adddfd1
Fixed reference-counter inference
2016-11-01 00:18:12 +03:00
Dmitry Stogov
d3325ff771
typo
2016-10-31 21:39:34 +03:00
Dmitry Stogov
e696927e48
Fixed reference-counter inference
2016-10-31 19:51:19 +03:00
Dmitry Stogov
bdd3fec7f8
Fixed incorrec type usage
2016-10-25 22:12:34 +03:00
Dmitry Stogov
01bc515b4d
Export zend_analyze_calls() to allow building call trees.
2016-10-25 17:20:27 +03:00
Nikita Popov
c3232c5903
Fix call graph construction
...
Travis build for 7.1+ has been failing for the past week...
2016-10-23 22:12:55 +02:00
Dmitry Stogov
565ce0d41d
Fixed typo
2016-10-20 01:17:40 +03:00
Dmitry Stogov
ac6134fb64
Fixed type inference rules.
2016-10-18 12:39:33 +03:00
Dmitry Stogov
ed3196ea35
Use simple "one-pass" algorithm.
2016-10-18 00:06:20 +03:00
Nikita Popov
9f472ba5e3
Various function info fixes
2016-10-15 23:58:31 +02:00
Nikita Popov
659cc278e2
Various RC inference fixes
2016-10-15 23:58:29 +02:00