Commit Graph

1619 Commits

Author SHA1 Message Date
Dmitry Stogov
a87a2f464b Send by reference without duplication 2018-01-17 18:50:18 +03:00
Dmitry Stogov
dd51cb1e34 More effecient array duplication 2018-01-17 17:56:04 +03:00
Dmitry Stogov
0bfc4f34ca Avoid EG(vm_interrupt) check on forward JMP 2018-01-16 13:50:36 +03:00
Dmitry Stogov
267b78550e Use fastcall calling convention 2018-01-16 10:33:41 +03: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
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
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
94508cdc3f Fixed whitespaces 2018-01-10 02:22:07 +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
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Dmitry Stogov
5c8f8f8fce Use ZEND_FAST_CONCAT instead of ZEND_CONCAT for CONST operands. 2017-12-29 13:54:18 +03:00
Dmitry Stogov
f010423335 Use IS_EQUAL instead of CASE when first operand is CV or CONST. Removed CASE handlers that duplicated IS_EQUAL. 2017-12-29 12:57:58 +03:00
Dmitry Stogov
27206f9cc5 Removed useless specialization 2017-12-29 12:02:50 +03:00
Dmitry Stogov
6e4d18924b Combine READY_TO_DESTROY, EXTRACT_ZVAL_PTR and FREE_OP_VAR_PTR into single, better optimized, macro. 2017-12-26 16:50:34 +03:00
Dmitry Stogov
6e23e84332 Use zval constructors instead ZVAL_COPY if we know the types 2017-12-26 16:49:34 +03:00
Dmitry Stogov
efcbea4345 Cheaper reference construction 2017-12-26 13:30:25 +03:00
Dmitry Stogov
35b3fdfd0a Separate exceptional code into cold functions. 2017-12-22 16:35:52 +03:00
Dmitry Stogov
f860ae451a fixed "unused function" compilation warning 2017-12-18 11:43:12 +03:00
Nikita Popov
93c7a3803f Fix const qualifier warning 2017-12-15 21:58:52 +01:00
Dmitry Stogov
66a604171c Array addition is not commutative 2017-12-15 14:40:19 +03:00
Dmitry Stogov
588f1df7a2 Remove duplicate handlers for commutative operations 2017-12-15 13:42:54 +03:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
David Walker
6d4de4cf05 Implement list() reference assignments
Support list() reference assignments of the form:

    list(&$a, list(&$b, $c)) = $d;

RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00
Dmitry Stogov
2d8f238318 Avoid duplication 2017-12-07 14:59:42 +03:00
Dmitry Stogov
3f6b46f331 typo 2017-12-07 12:26:48 +03:00
Dmitry Stogov
2ded0d2c0e Avoid unnecessary duplication 2017-12-07 12:00:41 +03:00
Dmitry Stogov
91507ba6e8 Reduced VM code size.
Made FETCH_DIM/OBJ_FUNC_ARG to dispatch ro corresponding FETCH_DIM/OBJ_R/_W handlers.
Merged TMP and VAR specializations of ZEND_FETCH_OBJ_R.
Allowed dispatching to less specialized handelrs and helpers. (e.g. from OP_TMP_CONST to OP_TMPVAR_CONST).
2017-12-07 01:52:27 +03:00
Dmitry Stogov
d1d1aff4e5 Optimization of init_func_execute_data() 2017-12-06 02:53:30 +03:00
Dmitry Stogov
7a136cd3dd Removed useless LOAD_OPLINE() 2017-12-05 17:40:39 +03:00
Dmitry Stogov
74c84cd7f0 Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage. 2017-12-04 17:17:02 +03:00
Dmitry Stogov
6a2738c713 CONCAT/FAST_CONCAT micro-optimization 2017-11-28 14:11:40 +03:00
Nikita Popov
828d8e635b Fix ZEND_VM_SPEC=0 build 2017-11-24 23:06:01 +01:00
Dmitry Stogov
ec2dde0c0b Introduced zend_hash_find_ex() that may avoid unnecessary hash value check. 2017-11-24 14:01:19 +03:00
Dmitry Stogov
33b094479b TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.
This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
2017-11-23 15:58:34 +03:00
Dmitry Stogov
d5dd27987f Don't mix TYPE and TYPE_INFO 2017-11-23 13:45:21 +03:00
Dmitry Stogov
8349268fa0 Delayed unlikely checks for uninitialized variables 2017-11-23 13:18:52 +03:00
Alessandro Chitolina
23b61f78a6 Fix segfault in token_get_all_variation19.phpt 2017-11-19 00:48:48 +01:00
Dmitry Stogov
aa7bf41502 Use cheaper checks 2017-11-17 13:23:22 +03:00
Dmitry Stogov
ccc12b82da Avoid unnecessary reference-counting on strings. 2017-11-16 17:09:32 +03:00
Dmitry Stogov
ce18738a30 Removed "_" from API functions. 2017-11-16 17:09:01 +03:00
Nikita Popov
1e3f625aa5 Merge branch 'PHP-7.2' 2017-11-15 23:01:52 +01:00
Nikita Popov
6640e03df8 Merge branch 'PHP-7.1' into PHP-7.2 2017-11-15 23:01:25 +01:00
DanielCiochiu
dba5a798a2 Fixed #74862: Unable to clone instance when private __clone defined
Even though __clone was implemented as private and called only from
parent class, child extending class instance could not be cloned.
2017-11-15 23:00:26 +01:00
Xinchen Hui
d56a534acc RC manipulation cleanup 2 2017-11-02 12:13:35 +08:00
Xinchen Hui
a8a17a72b0 RC manipulation cleanup 2017-11-01 10:25:10 +08:00