Dmitry Stogov
f98721b4e0
Intern auto global name strings in first place
2017-11-29 17:10:51 +03:00
Nikita Popov
8795893f4f
Make sure string property/class const values are interned
...
This was done for user-definde class constant values, however this
is also important for properties and internal classes.
2017-11-25 17:12:37 +01: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
Nikita Popov
9fbb019848
Move adjust_for_fetch_type directly after emission
...
And drop the distinction between compile_X and compile_X_common.
This avoids WTF moments like compile_simple_var_no_cv completely
ignoring the BP_VAR type passed to it...
2017-11-16 22:28:29 +01:00
Nikita Popov
d9da166649
Minor fetch type adjustment cleanup
...
No need to call adjust_fetch_type on FETCH_THIS, just to special
case it in adjust_fetch_type...
2017-11-16 22:13:07 +01:00
Dmitry Stogov
7fba7209e1
Fixed memory leak (Zend/tests/list_003.phpt)
2017-11-03 21:02:27 +03:00
Dmitry Stogov
990d8092a4
Reverted incomplete fix and too strict asserts.
2017-11-01 16:18:13 +03:00
Dmitry Stogov
02a05146fd
Fixed string interning during constants substitution
2017-11-01 10:56:37 +03:00
Xinchen Hui
a8a17a72b0
RC manipulation cleanup
2017-11-01 10:25:10 +08:00
Dmitry Stogov
d481d495cc
Fixed few inconsistent ZVALs in AST produced by compiler (REFCOUNTED and INTERNED strings)
2017-11-01 01:10:21 +03:00
Dmitry Stogov
5dbdc382af
Intern file names and class constants in first place (they may be interned later during constant substitution)
2017-10-31 15:36:55 +03: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
9cf87aa196
Avoid HashTable allocations for empty arrays (using zend_empty_array).
2017-10-24 17:27:31 +03:00
Dmitry Stogov
edc7c8ccfa
PHP must not create circular arrays when element is assigned by value.
2017-10-12 16:23:45 +03:00
Dmitry Stogov
ef5ea48741
Always use IS_CONSTANT_AST (IS_CONSTANT is removed).
2017-10-10 10:11:05 +03:00
Dmitry Stogov
39ded1d5f8
Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.
2017-10-09 16:57:51 +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
Dmitry Stogov
a80e462fbd
Order live ranges according to "start" position
2017-08-14 12:21:07 +03:00
Dmitry Stogov
2fab62271a
Revert "Fixed live_range removing (bug can be triggred by JIT)"
...
This reverts commit aecf996510
.
2017-08-14 12:00:02 +03:00
Xinchen Hui
aecf996510
Fixed live_range removing (bug can be triggred by JIT)
2017-08-11 21:56:30 +08:00
Dmitry Stogov
1180d8c801
Separate ISSET_ISEMPTY_CV/UNSET_CV from ISSET_ISEMPTY_VAR/UNSET_VAR
2017-07-17 14:11:50 +03:00
Anatol Belski
bc5811f361
further sync for vim mode lines
2017-07-04 18:12:45 +02:00
Nikita Popov
e5741da85c
Fix format arguments
...
Only dropped one before, both need to go...
2017-06-25 22:32:57 +02:00
Nikita Popov
9dfcb04f10
Fix typo
2017-06-25 22:28:56 +02:00
Michał Brzuchalski
8e10c9d373
Implement object type annotation
...
RFC: https://wiki.php.net/rfc/object-typehint
2017-06-25 21:49:41 +02:00
Dmitry Stogov
a916bed8f8
Fixed function name resolution
2017-05-30 21:48:16 +03:00
Dmitry Stogov
65edf44291
Check for possible run-time function name resolution
2017-05-30 17:37:54 +03:00
Dmitry Stogov
6043f76ad7
Added ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement corresponding builtin functions.
...
Special optimisation for "array_slice(INT, func_get_args())" pattern.
2017-05-30 13:23:17 +03:00
Dmitry Stogov
017d65d74a
Extend ZEND_SEND_ARRAY to eliminate array_slice() call for "call_user_func_array(_, array_slice(_, LONG, _))" pattern.
2017-05-30 12:25:46 +03:00
Dmitry Stogov
d32288b5bf
Fixed copy-paste mistake
2017-05-25 20:20:57 +03:00
Dmitry Stogov
f00d1c72b4
Added ZEND_GET_CLASS, ZEMD_GET_CALLED_CLASS, ZEND_GET_TYPE instructions, to implement corresponding builtin functions.
2017-05-25 18:41:28 +03:00
Dmitry Stogov
cd953269d3
Added ZEND_COUNT instruction, to implement corresponding builtin.
2017-05-25 12:52:34 +03:00
Dmitry Stogov
44ec732752
Fixed ZEND_IN_ARRAY related issues
2017-05-25 10:26:42 +03:00
Dmitry Stogov
7c7383067f
Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin function, through hash lookup in flipped array
2017-05-24 23:00:48 +03:00
Dmitry Stogov
8203a175b1
Remove unused opcode handlers
2017-05-18 13:18:08 +03:00
Anatol Belski
d5bc862470
avoid strlen in common case
2017-05-16 12:52:16 +02:00
Anatol Belski
de9124a2e7
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fixed bug #74589 __DIR__ wrong for unicode character
fixing run-tests.php for variables_order="GPCS"
2017-05-15 16:36:40 +02:00
Anatol Belski
ae3f975c5d
Fixed bug #74589 __DIR__ wrong for unicode character
2017-05-15 16:35:22 +02:00
Xinchen Hui
8daef7e423
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Fixed another potential dangling pointer
2017-05-08 11:36:35 +08:00
Xinchen Hui
2d30bc96a1
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed another potential dangling pointer
2017-05-08 11:36:29 +08:00
Xinchen Hui
b966a8b5fa
Fixed another potential dangling pointer
2017-05-08 11:36:07 +08:00
Xinchen Hui
1466925cb0
Merge branch 'PHP-7.1'
...
* PHP-7.1:
Update NEWS
Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
2017-05-08 11:33:01 +08:00
Xinchen Hui
2c070847e7
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
2017-05-08 11:32:27 +08:00
Xinchen Hui
87d56a3d07
Fixed bug #74546 (SIGILL in ZEND_FETCH_CLASS_CONSTANT_SPEC_CONST_CONST_HANDLER())
2017-05-08 11:32:08 +08:00
Andrea Faulds
44156b3114
Drop ZEND_API from zend_assert_valid_class_name
...
This is a convenience function for internal use and shouldn't have been
exported.
2017-04-29 16:09:08 +01:00
Nikita Popov
b6a4aad820
Remove the ZEND_ACC_CLONE flag
...
This one is completely unused
2017-04-22 15:47:53 +02:00
Nikita Popov
28218b4acc
Merge branch 'PHP-7.1'
2017-04-15 18:15:45 +02:00
Nikita Popov
2719b8e91c
Merge branch 'PHP-7.0' into PHP-7.1
2017-04-15 18:15:33 +02:00