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
Nikita Popov
e219ec144e
Implement typed properties
...
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734 , which is a squash of PR #3313 .
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
2019-01-11 15:49:06 +01:00
Nikita Popov
61b0122698
Merge branch 'PHP-7.3'
2019-01-10 10:27:57 +01:00
Nikita Popov
ade702a0d2
Fixed bug #77434
...
Mark arrays containing partial arrays as partial. This was already
done for the ADD_ARRAY_ELEMENT case, but not for ASSIGN_DIM.
2019-01-10 10:25:55 +01:00
Nikita Popov
767cbd93c9
Merge branch 'PHP-7.3'
2019-01-07 10:05:33 +01:00
Nikita Popov
6f75890e7b
Fix one issue reported in bug #77310
...
SCCP did not handle array ASSIGN_* with a BOT operand correctly.
2019-01-07 10:05:23 +01:00
Nikita Popov
0bbfebb6d9
Add SCCP support for ZEND_ARRAY_KEY_EXISTS
2018-12-26 23:54:11 +03:00
Nikita Popov
429c5a0a82
Merge branch 'PHP-7.3'
2018-11-02 14:34:11 +01:00
Nikita Popov
d92f7630f7
Merge branch 'PHP-7.2' into PHP-7.3
2018-11-02 14:30:50 +01:00
Nikita Popov
4daa413898
Fixed bug #77092
...
Weird that this worked for so long, probably because nearly all
ext/standard functions use fast ZPP rather than ordinary ZPP.
2018-11-02 14:29:03 +01:00
Zeev Suraski
9afce019e0
Future-proof email addresses
2018-11-01 18:35:32 +02:00
Zeev Suraski
67e0138c0d
Future-proof email addresses...
2018-11-01 18:30:28 +02:00
Peter Kokot
902d39a3a7
Trim trailing whitespace in source code files
2018-10-13 14:14:50 +02:00
Nikita Popov
1038c4b4ce
Merge branch 'PHP-7.3'
2018-09-07 14:03:04 +02:00
Nikita Popov
a32c563e50
Merge branch 'PHP-7.2' into PHP-7.3
2018-09-07 14:02:51 +02:00
Nikita Popov
cfdd828163
Fixed bug #76796
2018-09-07 14:02:03 +02:00
Dmitry Stogov
d140df58e6
Keep information about unresolved interfaces in zend_class_entry->interface_names.
...
Move interface implementation code into ZEND_DECLARE_*CLASS opcodes.
Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
2018-08-23 17:16:28 +03:00
Dmitry Stogov
67397970b2
Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.
...
Move trait binding code into ZEND_DECLARE_*CLASS opcodes.
Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
2018-08-23 02:02:26 +03:00
Gabriel Caruso
84b195d9fc
Fix some misspellings
2018-08-12 16:15:45 +02:00
Dmitry Stogov
84d7d4e1cc
Fixed bug #76466 (Loop variable confusion)
2018-06-18 11:21:23 +03:00
Dmitry Stogov
9e0f131d2b
Fixed ISSET/ISEMPTY bit meaning to simplify run-time checks
2018-05-31 19:02:51 +03:00
Dmitry Stogov
5eb1f92f31
Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence.
2018-05-28 16:27:12 +03:00
Dmitry Stogov
c88be6aee1
Bit check micro-optimization
2018-04-28 14:13:12 +03:00
Nikita Popov
9a3bb1201f
Merge branch 'PHP-7.2'
2018-03-24 13:16:31 +01:00
Nikita Popov
3306577797
Followup fix for bug #75729
...
The case of overloaded substr() with 3 arguments was not handled.
2018-03-24 13:15:59 +01:00
Nikita Popov
aa7dbc8ee7
Merge branch 'PHP-7.2'
2018-02-05 21:10:12 +01:00
Nikita Popov
d9e71169e6
Fixed bug #75729
...
Don't try to evaluate substr() and strpos() at compile-time if
mbstring function overloading is enabled. I'm reusing the
COMPILE_NO_BUILTIN_STRLEN for the detection of mbstring function
overloading here, even if it's technically only about strlen()...
2018-02-05 21:08:18 +01:00
Dmitry Stogov
ca035f26aa
Moved "zval.u2.cache_slot" into free room of "zend_op"
2018-02-05 19:41:47 +03:00
Dmitry Stogov
3a794d39f0
Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
2018-02-05 19:40:06 +03:00
Dmitry Stogov
f67f455ef7
Changed FETCH_CLASS instruction format (extended_value moved into op1)
2018-01-31 18:14:43 +03:00
Dmitry Stogov
7141631cc8
Change FETCH/ISSET instruction modifiers:
...
- Get rid of ZEND_ISEMPTY and ZEND_ISSET_ISEMPTY_MASK. Use just single ZEND_ISSET bit to make distinct between isset() and empty()
- Use ZEND_FETCH_GLOBAL, ZEND_FETCH_LOCAL and ZEND_FETCH_GLOBAL_LOCK as bitmask
- Removed unused ZEND_FETCH_STANDARD
- Extended ZEND_FETCH_ARG_MASK
2018-01-30 22:06:05 +03:00
Dmitry Stogov
bf7176c70f
Use reference-counting instead of duplication and separation, if really necessary.
2018-01-19 01:03:24 +03:00
Xinchen Hui
63a96ebf6a
Fixed bug while dealing with ADD_ARRAY_ELEMENT against an existing const array
2018-01-07 14:17:47 +08:00
Xinchen Hui
8d63c834e4
Change assertion
2018-01-05 15:05:05 +08:00
Xinchen Hui
729a6688af
Optimized FETCH_CLASS before INSTANCEOF out if possible
2018-01-05 12:58:28 +08:00
Xinchen Hui
1db6c19365
Fixed wrongly const replacing on partial array
2018-01-05 12:29:39 +08:00