Nikita Popov
e0171ed9d0
Avoid another unused opline warning
...
The unconditional opline load here used to be necessary for freeing
the return value in case of exception. However, this is no longer
the case, so using LOAD_OPLINE() should be sufficient now.
2018-02-03 17:43:41 +01:00
Nikita Popov
24e744d8a2
Avoid VM warning if building without global regs
2018-02-03 17:43:41 +01:00
Dmitry Stogov
ba298725d1
Changed CATCH instruction format (extended_value moved into op2, op2 into result, result into extended_value)
2018-01-31 22:39:30 +03:00
Dmitry Stogov
9c7fb529ce
Changed FETCH_CONSTANT instruction format (extended_value moved into op1)
2018-01-31 18:15:25 +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
9701b644fa
Compress handlers table
2018-01-31 16:46:30 +03:00
Dmitry Stogov
59ede4c82b
Avoid redundand mask extraction
2018-01-31 13:47:43 +03:00
Dmitry Stogov
1d7eab12e6
Avoid redundand mask extraction
2018-01-31 13:34:34 +03:00
Dmitry Stogov
17a3b48454
Make IS_UNUSED to be zero.
2018-01-31 11:18:41 +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
5e8aa036f2
Access extra data stored in zval through macros
2018-01-23 12:56:22 +03:00
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