Commit Graph

13202 Commits

Author SHA1 Message Date
Anatol Belski
560cc32e21 Fix __cpuidex usage 2018-01-16 10:56:46 +01:00
Dmitry Stogov
4861373182 Replace checks with asserts 2018-01-16 11:39:51 +03:00
Dmitry Stogov
b279aea2bf Removed reference to the obsolete zend_vm_use_old_executor() 2018-01-16 10:44:15 +03:00
Dmitry Stogov
d7f3b9b4e9 Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src:
  Added missed header file
  Added ZEND_API zend_cpu_supports
2018-01-16 10:34:15 +03:00
Dmitry Stogov
267b78550e Use fastcall calling convention 2018-01-16 10:33:41 +03:00
Xinchen Hui
3cb7fff9f1 Added missed header file 2018-01-16 14:56:43 +08:00
Xinchen Hui
ff6a9d1f10 Merge branch 'master' of git.php.net:/php-src
* 'master' of git.php.net:/php-src:
  Removed recursive call
  Put ZEND_FASTCALL into the proper place.
2018-01-16 14:54:05 +08:00
Xinchen Hui
3a3e0493d0 Added ZEND_API zend_cpu_supports 2018-01-16 14:53:00 +08:00
Dmitry Stogov
d688129360 Removed recursive call 2018-01-16 09:44:49 +03:00
Dmitry Stogov
1e783db679 Put ZEND_FASTCALL into the proper place. 2018-01-16 09:44:10 +03:00
Dmitry Stogov
022e029984 Optimize zval_dtor_func() 2018-01-16 00:57:47 +03:00
Dmitry Stogov
d5238b95a3 Added missing #if to allow compilation withput ZEND_MM_CUSTOM 2018-01-15 17:37:15 +03:00
Dmitry Stogov
106575ed39 Manual CSE 2018-01-15 17:36:35 +03:00
Nikita Popov
3eaab04663 Merge branch 'PHP-7.2' 2018-01-15 12:16:16 +01:00
Nikita Popov
f3c1726d25 Merge branch 'PHP-7.1' into PHP-7.2 2018-01-15 12:16:00 +01:00
Nikita Popov
2023346973 Fixed bug #75079 2018-01-15 12:15:40 +01:00
Nikita Popov
6aa045e174 Merge branch 'PHP-7.2' 2018-01-13 11:06:58 +01:00
Nikita Popov
cf70e1910b Merge branch 'PHP-7.1' into PHP-7.2 2018-01-13 11:06:46 +01:00
Nikita Popov
8c07170ddb Fix generator GC if yield from parent chain does not reach root
Parents may be unlinked while another generator sharing part of the
chain is running. As such, we cannot assume that the parent chain
goes all the way to the root. Instead walk backwards from root to
leaf, like we also do during destruction.
2018-01-13 11:04:26 +01:00
Nikita Popov
47e6c1491b Merge branch 'PHP-7.2' 2018-01-12 22:51:29 +01:00
Nikita Popov
d00f52b6a9 Merge branch 'PHP-7.1' into PHP-7.2 2018-01-12 22:51:20 +01:00
Nikita Popov
cab0a814bd Try to fix yield from GC issues
Make sure we always update root and parent references before
releasing the old root object.

This fixes some crashes under aggressive cycle collection, so
hopefully this will also fix bug #75351.
2018-01-12 22:51:03 +01:00
Nikita Popov
d8d20020f5 Merge branch 'PHP-7.2' 2018-01-12 21:28:31 +01:00
Nikita Popov
e112b8474a Merge branch 'PHP-7.1' into PHP-7.2 2018-01-12 21:28:24 +01:00
Nikita Popov
420d11e8ca Fixed bug #75396
Do not run finally blocks in generators on unclean shutdown (e.g.
caused by exit). This is consistent with how finally blocks outside
of generators behave.
2018-01-12 21:27:23 +01:00
Nikita Popov
5fef837c28 Simplify non-linear generator yield from tree
Remove special handling for 2-4 children. Now the three possible
cases are no children, one child, or many children (HT).

The non-linear (many children) case is extremely rare, so there is
no point in trying to optimize it.
2018-01-12 21:14:50 +01:00
timurib
a484b9a535 Fix #75765 Exception on extend of undefined class
As the parent class is fetched prior to binding, there are no
safety concerns in this case and we can replace the fatal error
with an Error exception.
2018-01-12 18:41:39 +01:00
Nikita Popov
27f09efa11 Avoid duplicate addition of generators in yield from tree 2018-01-12 18:37:47 +01:00
Dmitry Stogov
12c386f5b9 Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573af, now it should be OK). 2018-01-11 22:15:45 +03:00
Dmitry Stogov
0ec631c996 Improve Closure::call(). Eliminate zend_fcall_info_init() call and reset ZEND_ACC_CLOSURE flag. 2018-01-11 21:23:52 +03:00
Dmitry Stogov
70aa967d81 Reorder zend_op_array fields for better data locality and packing 2018-01-11 19:50:27 +03:00
Dmitry Stogov
c9034c3b33 Get rid of zend_op_array.early_binding 2018-01-11 19:15:52 +03:00
Dmitry Stogov
6ba10a03e7 Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong)
This reverts commit 781e1573af.
2018-01-11 17:27:26 +03:00
Dmitry Stogov
781e1573af Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. 2018-01-11 16:25:28 +03:00
Christoph M. Becker
35e70af208 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75799 (arg of get_defined_functions is optional)
2018-01-11 13:14:37 +01:00
Christoph M. Becker
7e1d2bd82a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75799 (arg of get_defined_functions is optional)
2018-01-11 13:13:49 +01:00
Gabriel Caruso
a843a86e6f Fixed bug #75799 (arg of get_defined_functions is optional) 2018-01-11 13:10:47 +01:00
Dmitry Stogov
57e4be9cef Avoid, most offten unnecessary, memory load. 2018-01-11 12:15:34 +03:00
Dmitry Stogov
f09c012ebe Mark FETCH_OBJ_R and INIT_METHOD_CALL as HOT_OBJ for (UNUSED+CONST and CV+CONST) 2018-01-10 19:14:52 +03:00
Dmitry Stogov
c73a42ccec Added abiliy to mark object specific handlers with most often used operand types as HOT. (UNUSED+CONST and CV+CONST) 2018-01-10 19:00:38 +03:00
Dmitry Stogov
9d7544aa1c Convert "sparse switch" statements into sequences of "if" with the most probable conditions first 2018-01-10 15:12:03 +03:00
Dmitry Stogov
c533396ce4 Strength reduction 2018-01-10 14:23:43 +03:00
Dmitry Stogov
20a1124f63 Added expectation 2018-01-10 12:37:13 +03:00
Dmitry Stogov
c32d79b65f cleanup 2018-01-10 12:03:04 +03:00
Dmitry Stogov
94508cdc3f Fixed whitespaces 2018-01-10 02:22:07 +03:00
Dmitry Stogov
83aa742dde Removed unused array 2018-01-09 23:17:10 +03:00
Nikita Popov
d9c706f28d Merge branch 'PHP-7.2' 2018-01-09 20:25:19 +01:00
Nikita Popov
2dd80a0782 Merge branch 'PHP-7.1' into PHP-7.2 2018-01-09 20:24:48 +01:00
Nikita Popov
fd30c59e04 Fixed bug #75786
SEND_UNPACK on iterators was duplicating references in-place,
which effectively leaks the original value and causes an off-by-one
refcount on the duplicated value.

Replace this with a deref, as an actual duplication is not even
needed in this case.
2018-01-09 20:20:31 +01:00
Dmitry Stogov
09b1bfecee Allow commas in specializer conditions 2018-01-09 15:08:18 +03:00