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
Dmitry Stogov
fcc08ce19f
Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
...
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
49ea143bbd
Encapsulate reference-counting primitives.
...
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
aeca761856
Removed useless reallocations
2017-10-26 19:13:53 +03:00
Dmitry Stogov
6a034be2c6
Fixed signed/unsigned comparisons
2017-10-25 11:45:17 +03:00
Dmitry Stogov
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +03:00
Dmitry Stogov
59a7944bc6
Made run_time_cache to keep "offset" to dynamic properties Buckets (instead of index).
2017-10-24 10:28:19 +03:00
Dmitry Stogov
193adbdf30
Use run-time cache to keep position of dynamic properties in HashTable to access them without hash lookup.
2017-10-23 18:29:13 +03:00
Dmitry Stogov
d0f4dbfd96
Make assertions in DO_ICALL and CALL_TRAMPOLINE to be consistent with DO_FCALL.
2017-10-17 13:35:59 +03:00
Dmitry Stogov
61ef91bf0d
Revert "Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL)."
...
This reverts commit da781a5ac2
.
2017-10-17 13:25:19 +03:00
Dmitry Stogov
da781a5ac2
Allow internal functions to return values by reference (this was disabled in implementation of DO_ICALL, but enabled in DO_FCALL).
...
However, don't require internal functions returning by reference to return a reference.
Mark unserialize() as returning by reference and remove unwrap_reference hack, to allow proper returning of self referenced arrays using a reference.
Currently unserialize() is the only internal function that may return a reference.
2017-10-17 11:50:34 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
fcccb0d6ea
Use zval_ptr_dtor_nogc() in places where circular zvals are not possible
2017-10-09 12:24:11 +03:00
Dmitry Stogov
e70618aff6
Changed the way VM accesses constant operands in 64-bit builds.
2017-10-04 16:53:01 +03:00
Dmitry Stogov
44e0b79ac6
Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
2017-09-20 02:25:56 +03:00