Commit graph

118 commits

Author SHA1 Message Date
Nikita Popov
272a9f29f5 Merge branch 'PHP-7.1' 2017-06-23 17:33:36 +02:00
Nikita Popov
5b5a92b8b6 Fixed bug #74623 2017-06-23 17:32:45 +02:00
Nikita Popov
4948da178a Make inference robust against infinite loop
Right now, if narrowing occurs on non-debug builds, inference can
easily go into an infinite loop. Prevent this, and add a pointer
that this should be reported as a bug.
2017-06-23 17:07:44 +02:00
Dmitry Stogov
6043f76ad7 Added ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement corresponding builtin functions.
Special optimisation for "array_slice(INT, func_get_args())" pattern.
2017-05-30 13:23:17 +03:00
Dmitry Stogov
f00d1c72b4 Added ZEND_GET_CLASS, ZEMD_GET_CALLED_CLASS, ZEND_GET_TYPE instructions, to implement corresponding builtin functions. 2017-05-25 18:41:28 +03:00
Dmitry Stogov
cd953269d3 Added ZEND_COUNT instruction, to implement corresponding builtin. 2017-05-25 12:52:34 +03:00
Dmitry Stogov
89b3c9f647 Optimizer support for ZEND_IN_ARRAY 2017-05-24 23:37:35 +03:00
Dmitry Stogov
bd78dc578e Expose zend_ssa_is_no_val_use() 2017-04-03 16:57:29 +03:00
Dmitry Stogov
6af1ffb57d Allow SSA construction with source information about CV used as result 2017-03-30 20:14:01 +03:00
Nikita Popov
7ea854b1df Merge branch 'PHP-7.1' 2017-03-16 18:15:13 +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
69dc088c36 Merge branch 'PHP-7.1' 2017-03-16 17:40:33 +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
da223b9500 Merge branch 'PHP-7.1' 2017-03-16 12:34:36 +01:00
Nikita Popov
9331be7d6a Use call_map to avoid linear call lookup 2017-03-16 12:33:57 +01:00
Dmitry Stogov
6a31872307 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed pointer allignment
2017-03-07 10:18:57 +03:00
Dmitry Stogov
d9231b1667 Fixed pointer allignment 2017-03-07 10:18:34 +03:00
Dmitry Stogov
141d1ba980 Introduced "zend_type" - an abstraction for type-hinting representation. 2017-01-13 11:37:46 +03:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Nikita Popov
6c614cb14c Merge branch 'PHP-7.1' 2016-12-06 22:26:36 +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
89f8a34483 Merge branch 'PHP-7.1' 2016-12-06 22:12:01 +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
Dmitry Stogov
7abf3b56f5 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed access to uninitialized value
2016-12-01 13:26:26 +03:00
Dmitry Stogov
54244ba565 Fixed access to uninitialized value 2016-12-01 13:25:50 +03:00
Nikita Popov
0004f7e86d Merge branch 'PHP-7.1' 2016-11-17 13:48:07 +01:00
Nikita Popov
226b82b127 RC inference fixes 2016-11-17 13:47:36 +01:00
Dmitry Stogov
f62d876e56 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed type ingference
2016-11-16 20:49:20 +03:00
Dmitry Stogov
a04d9e0f1b Fixed type ingference 2016-11-16 20:49:00 +03:00
Kalle Sommer Nielsen
4cef0ead49 Fix Windows build 2016-11-12 11:18:25 +01:00
Nikita Popov
976d72a3bd Merge branch 'PHP-7.1' 2016-11-10 14:59:56 +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
dcf4bdb844 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed reference-counter inference
2016-10-31 19:51:50 +03:00
Dmitry Stogov
e696927e48 Fixed reference-counter inference 2016-10-31 19:51:19 +03:00
Dmitry Stogov
5551cccc92 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed type inference rules.
  Update NEWS
2016-10-18 12:41:10 +03:00
Dmitry Stogov
ac6134fb64 Fixed type inference rules. 2016-10-18 12:39:33 +03:00
Nikita Popov
f58701fe6f Merge branch 'PHP-7.1' 2016-10-16 00:04:23 +02:00
Nikita Popov
659cc278e2 Various RC inference fixes 2016-10-15 23:58:29 +02:00
Dmitry Stogov
e92a18dcd5 Fixed referencecounter inference rules
(cherry picked from commit 6046a99b97)
2016-10-14 01:24:46 +02:00
Dmitry Stogov
233992409b Fixed referencecounter inference rules
(cherry picked from commit fae7d6b9bb)
2016-10-14 01:24:23 +02:00
Dmitry Stogov
6046a99b97 Fixed referencecounter inference rules 2016-10-11 15:43:23 +03:00
Dmitry Stogov
fae7d6b9bb Fixed referencecounter inference rules 2016-10-11 01:58:30 +03:00
Dmitry Stogov
38e765d710 Merge branch 'PHP-7.1'
* PHP-7.1:
  Removed deprecated flag
  Fixed information about possible return value
2016-10-10 11:49:12 +03:00
Dmitry Stogov
3760bc5407 Removed deprecated flag 2016-10-10 11:48:29 +03:00
Dmitry Stogov
f924893ab9 Merge branch 'PHP-7.1'
* PHP-7.1:
  Updated reference-counting inferece rules. The previous rules refected PHP-5 behavior and were completely wrong for PHP-7. (e.g. scalars don't have reference counters at all). This change shouldn't affect anything, because results of this inference are not used yet.
  Fix NEWS after re-roll of RC3
2016-10-06 11:16:43 +03:00
Dmitry Stogov
b2d53e47ed Updated reference-counting inferece rules.
The previous rules refected PHP-5 behavior and were completely wrong for PHP-7. (e.g. scalars don't have reference counters at all).
This change shouldn't affect anything, because results of this inference are not used yet.
2016-10-06 11:08:01 +03:00
Dmitry Stogov
c218c4f01e Special handling for $php_errormsg and $http_response_header. 2016-09-30 02:41:08 +03:00
Nikita Popov
8c26762baf Merge branch 'PHP-7.1' 2016-09-24 22:46:43 +02:00
Nikita Popov
c7651c2396 Fix a couple of ASSIGN_DIM/OBJ inference bugs
Account for possible null return values better.
2016-09-24 22:43:27 +02:00