Commit Graph

122 Commits

Author SHA1 Message Date
Dmitry Stogov
5ac3580b9b Merge branch 'PHP-7.4'
* PHP-7.4:
  ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
2019-07-19 10:10:50 +03:00
Dmitry Stogov
b065fbde19 ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW. 2019-07-19 10:09:26 +03:00
Dmitry Stogov
1b5b8175af Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:16:30 +03:00
Dmitry Stogov
48ca5a1e17 Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP 2019-07-05 12:03:25 +03:00
Nikita Popov
fa1a03f7a2 Merge branch 'PHP-7.4' 2019-07-03 10:22:41 +02:00
Nikita Popov
c0924cf67d Merge branch 'PHP-7.3' into PHP-7.4 2019-07-03 10:20:32 +02:00
Nikita Popov
4892bbc167 Fixed bug #78230 2019-07-03 10:20:07 +02:00
Nikita Popov
0a0ca984f0 Merge branch 'PHP-7.4' 2019-06-28 14:48:08 +02:00
Nikita Popov
ca6f41aa5a Fix out of bounds read in sccp 2019-06-28 14:47:49 +02:00
Nikita Popov
e4fae9c061 Merge branch 'PHP-7.4' 2019-06-11 13:16:38 +02:00
Nikita Popov
89b2d88659 Register class before fetching parent
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Nikita Popov
0d239523a7 Merge branch 'PHP-7.4' 2019-05-29 16:48:37 +02:00
Nikita Popov
029b735a6e Merge branch 'PHP-7.3' into PHP-7.4 2019-05-29 16:48:28 +02:00
Nikita Popov
61a38bb274 SCCP: Fix leak when determining TYPE_CHECK from type info
As TYPE_CHECK is the only opcode where we do something like this,
I'm adding this hack.
2019-05-29 16:47:19 +02:00
Nikita Popov
0d744f78e6 Merge branch 'PHP-7.4' 2019-05-28 16:15:54 +02:00
Nikita Popov
f19dd674e0 SCCP: Fix handling of ASSIGN_OBJ_REF
The generic BOT handling is not away of OP_DATA, so need to handle
this opcode before we get to that.
2019-05-28 16:15:37 +02:00
Nikita Popov
8b3a71f904 Merge branch 'PHP-7.4' 2019-05-28 15:46:15 +02:00
Nikita Popov
6893f1f98e SCCP: Don't perform partial object propagation for typed props 2019-05-28 15:46:03 +02:00
Nikita Popov
200f5b407e Merge branch 'PHP-7.4' 2019-05-23 10:01:46 +02:00
Nikita Popov
dcccdc471d Don't require NO_ESCAPE for partial arrays in SCCP 2019-05-23 09:59:25 +02:00
Nikita Popov
69517d037b Merge branch 'PHP-7.4' 2019-05-21 17:35:33 +02:00
Nikita Popov
f260c0918f Merge branch 'PHP-7.3' into PHP-7.4 2019-05-21 17:35:28 +02:00
Nikita Popov
97ba6b0d8b Don't evaluate functions with partial array arguments 2019-05-21 17:35:03 +02:00
Nikita Popov
dda0ae3e59 Merge branch 'PHP-7.4' 2019-05-21 17:18:01 +02:00
Nikita Popov
436a47428b Merge branch 'PHP-7.3' into PHP-7.4 2019-05-21 17:17:45 +02:00
Nikita Popov
30f1b17262 Fix null check in sccp add_array_elem chain handling
We need to check result_use rather than result_def for a null zval.
Previously we were later assuming that the null zval is really a
partial array, which does not go well.
2019-05-21 17:15:07 +02:00
Nikita Popov
4c5f83f644 Merge branch 'PHP-7.4' 2019-05-21 17:04:17 +02:00
Nikita Popov
a87448bb55 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-21 17:03:52 +02:00
Nikita Popov
fc4836b193 Fix partial array handling in FE_RESET edge feasibility 2019-05-21 16:59:27 +02:00
Nikita Popov
cd188d0398 Handle partial arrays in zend_is_true() checks 2019-05-21 16:53:34 +02:00
Nikita Popov
bdce5849b7 Extract ct_eval_binary_op()
And use it in more places, though some of them are currently not
reachable by partial arrays to the best of my knowledge.
2019-05-21 16:43:41 +02:00
Nikita Popov
367788cbc3 Improve SCCP debug code
In particular properly dump partial arrays when tracing execution.
2019-05-21 16:42:13 +02:00
Nikita Popov
6b15163369 Merge branch 'PHP-7.4' 2019-05-15 14:36:53 +02:00
Nikita Popov
806db1a793 Merge branch 'PHP-7.3' into PHP-7.4 2019-05-15 14:36:45 +02:00
Nikita Popov
9d76fbd0c4 Fixed bug #78015
Don't try to evaluate various operations with partial array operands.
We could evaluate some of these, but let's be conservative for now...
2019-05-15 14:35:31 +02:00
Nikita Popov
f106f57164 Merge branch 'PHP-7.4' 2019-05-13 14:43:10 +02:00
CHU Zhaowei
e829d08729 Implement spread operator in arrays
RFC: https://wiki.php.net/rfc/spread_operator_for_array

Closes GH-3640.
2019-05-13 14:42:43 +02:00
Dmitry Stogov
dd7cbadc02 Merge branch 'PHP-7.4'
* PHP-7.4:
  Optimize constant SWITCH_LONG and SWITCH_STRING
2019-04-24 00:09:12 +03:00
Dmitry Stogov
db2ffcf157 Optimize constant SWITCH_LONG and SWITCH_STRING 2019-04-24 00:08:17 +03:00
Dmitry Stogov
32b16338b6 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed SCCP support for ZEND_ASSIGN_OBJ_REF
2019-04-03 11:23:37 +03:00
Dmitry Stogov
c941f1d8c7 Fixed SCCP support for ZEND_ASSIGN_OBJ_REF 2019-04-03 11:22:59 +03:00
Dmitry Stogov
cdade2e35d Merge branch 'PHP-7.4'
* PHP-7.4:
  Remove copyright years.
2019-02-05 10:33:57 +03:00
Dmitry Stogov
da919a8b65 Remove copyright years. 2019-02-05 10:33:28 +03:00
Joe Watkins
4752aecdaf
Merge branch 'PHP-7.4'
* PHP-7.4:
  Properly check for array_replace_recursive in sccp.c
2019-02-03 08:42:22 +01:00
Joe Watkins
ed1afdd617
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Properly check for array_replace_recursive in sccp.c
2019-02-03 08:42:07 +01:00
Joe Watkins
e1c93d1fb2
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Properly check for array_replace_recursive in sccp.c
2019-02-03 08:41:26 +01:00
Tyson Andre
cf56832d00
Properly check for array_replace_recursive in sccp.c
Due to a typo, this code used to check for array_merge_recursive
twice.
2019-02-03 08:40:21 +01:00
Nikita Popov
331e56ce38 Remove mbstring.func_overload
Deprecated in PHP 7.2 as part of
https://wiki.php.net/rfc/deprecations_php_7_2.
2019-01-28 15:58:23 +01:00
Nikita Popov
a50198d0fe Implement ??= operator
RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator

$a ??= $b is $a ?? ($a = $b), with the difference that $a is only
evaluated once, to the degree that this is possible. In particular
in $a[foo()] ?? $b function foo() is only ever called once.
However, the variable access themselves will be reevaluated.
2019-01-22 11:12:04 +01:00
Nikita Popov
3269e88468 Implement single-pass live range calculation
Instead of interleaving creation of live-ranges with the main
compiler code, compute them in a separate pass over the opcodes
as part of pass_two. Additionally, do not keep live ranges
synchronized during optimization in opcache and instead use the
same mechanism to recompute them after optimization.
2019-01-21 11:47:27 +01:00