summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_opcodes.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed opcode descriptionDmitry Stogov2019-07-081-1/+1
|
* Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ↵Dmitry Stogov2019-07-051-83/+55
| | | | ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
* Improve zend_binary_assign_op helpers.Dmitry Stogov2019-07-041-17/+17
| | | | Reorder opcode numbers to make ADD-POW and ASSIGN_ADD-ASSIGN_POW opcodes sequencional.
* Optimization of INC/DEC helpersDmitry Stogov2019-07-031-5/+5
|
* Reduce overhead of delayed early bindingDmitry Stogov2019-06-251-1/+1
|
* Register class before fetching parentNikita Popov2019-06-111-6/+6
| | | | | We want the class declaration to be available while compiling the parent class.
* Don't specialize "cold" handlersDmitry Stogov2019-05-311-2/+2
|
* Removed useless specialization. Specialized handlers called not specialized ↵Dmitry Stogov2019-05-311-10/+10
| | | | helpers.
* Implement spread operator in arraysCHU Zhaowei2019-05-131-2/+4
| | | | | | RFC: https://wiki.php.net/rfc/spread_operator_for_array Closes GH-3640.
* Avoid useless code duplication, because of unused specializationDmitry Stogov2019-02-151-3/+3
|
* Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
|
* Implement ??= operatorNikita Popov2019-01-221-2/+4
| | | | | | | | | RFC: https://wiki.php.net/rfc/null_coalesce_equal_operator $a ??= $b is $a ?? ($a = $b), with the difference that $a is only evaluated once, to the degree that this is possible. In particular in $a[foo()] ?? $b function foo() is only ever called once. However, the variable access themselves will be reevaluated.
* Implement typed propertiesNikita Popov2019-01-111-18/+32
| | | | | | | | | | RFC: https://wiki.php.net/rfc/typed_properties_v2 This is a squash of PR #3734, which is a squash of PR #3313. Co-authored-by: Bob Weinand <bobwei9@hotmail.com> Co-authored-by: Joe Watkins <krakjoe@php.net> Co-authored-by: Dmitry Stogov <dmitry@zend.com>
* Implement ZEND_ARRAY_KEY_EXISTS opcode to speed up array_key_exists()Michael Moravec2018-12-261-2/+4
|
* Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-3/+3
|
* Keep information about unresolved interfaces in ↵Dmitry Stogov2018-08-231-3/+3
| | | | | | | zend_class_entry->interface_names. Move interface implementation code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_INTERFACE and ZEND_VERIFY_ABSTRACT_CLASS opcodes.
* Replace zend_class_entry->traits by persistent zend_class_entry->trait_names.Dmitry Stogov2018-08-231-3/+3
| | | | | Move trait binding code into ZEND_DECLARE_*CLASS opcodes. Remove ZEND_ADD_TRIAIT and ZEND_BIND_TRAITS opcodes.
* Don't use second operand of BIND_STATIC instruction.Dmitry Stogov2018-08-211-1/+1
|
* Fixed bug #76752 (Crash in ZEND_COALESCE_SPEC_TMP_HANDLER - assertion in ↵Xinchen Hui2018-08-171-1/+1
| | | | _get_zval_ptr_tmp failed).
* Encode parent class name as IS_CONST operand in DECLARE_INHERITED_CLASS and ↵Dmitry Stogov2018-07-251-4/+4
| | | | | | DECLARE_ANON_INHERITED_CLASS opcodes (eliminate FETCH_CLAS S opcode).
* Inline few small opcode handlers into hybrid executorDmitry Stogov2018-06-071-1/+1
|
* Avoid live range references in opcodesNikita Popov2018-02-161-2/+2
| | | | | | | | Don't store the live range of the freed variable for FREE_ON_RETURN frees, instead look it up at runtime. As this is an extremely unlikely codepath (in particular, it requires a loop variable with a throwing destructor), saving the runtime lookup of the live range is not worth the extra complexity this adds everywhere else.
* fix unknown opcode overflow errorHaitao Lv2018-02-121-0/+7
|
* Moved "zval.u2.cache_slot" into free room of "zend_op"Dmitry Stogov2018-02-051-52/+52
|
* Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and ↵Dmitry Stogov2018-02-051-8/+8
| | | | following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
* Changed CATCH instruction format (extended_value moved into op2, op2 into ↵Dmitry Stogov2018-01-311-1/+1
| | | | result, result into extended_value)
* Changed FETCH_CONSTANT instruction format (extended_value moved into op1)Dmitry Stogov2018-01-311-1/+1
|
* Changed FETCH_CLASS instruction format (extended_value moved into op1)Dmitry Stogov2018-01-311-2/+2
|
* Use fastcall calling conventionDmitry Stogov2018-01-161-2/+2
|
* year++Xinchen Hui2018-01-021-1/+1
|
* Use ZEND_FAST_CONCAT instead of ZEND_CONCAT for CONST operands.Dmitry Stogov2017-12-291-1/+1
|
* Use IS_EQUAL instead of CASE when first operand is CV or CONST. Removed CASE ↵Dmitry Stogov2017-12-291-1/+1
| | | | handlers that duplicated IS_EQUAL.
* Removed useless specializationDmitry Stogov2017-12-291-3/+3
|
* Array addition is not commutativeDmitry Stogov2017-12-151-1/+1
|
* Remove duplicate handlers for commutative operationsDmitry Stogov2017-12-151-10/+10
|
* Implement list() reference assignmentsDavid Walker2017-12-091-3/+5
| | | | | | | | Support list() reference assignments of the form: list(&$a, list(&$b, $c)) = $d; RFC: https://wiki.php.net/rfc/list_reference_assignment
* Reduced VM code size.Dmitry Stogov2017-12-071-1/+1
| | | | | | 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).
* TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.Dmitry Stogov2017-11-231-1/+1
| | | | This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
* Separate ISSET_ISEMPTY_CV/UNSET_CV from ISSET_ISEMPTY_VAR/UNSET_VARDmitry Stogov2017-07-171-3/+7
|
* Update opcode descriptionDmitry Stogov2017-05-301-1/+1
|
* Added ZEND_FUNC_NUM_ARGS, ZEND_FUNC_GET_ARGS instructions, to implement ↵Dmitry Stogov2017-05-301-2/+6
| | | | | | corresponding builtin functions. Special optimisation for "array_slice(INT, func_get_args())" pattern.
* Added ZEND_GET_CLASS, ZEMD_GET_CALLED_CLASS, ZEND_GET_TYPE instructions, to ↵Dmitry Stogov2017-05-251-2/+8
| | | | implement corresponding builtin functions.
* Added ZEND_COUNT instruction, to implement corresponding builtin.Dmitry Stogov2017-05-251-2/+4
|
* Added ZEND_IN_ARRAY instruction, implementing optimized in_array() builtin ↵Dmitry Stogov2017-05-241-2/+4
| | | | function, through hash lookup in flipped array
* Implement jumptable optimizationNikita Popov2017-04-101-2/+6
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Use SEND_USER for CONST|TMP as wellNikita Popov2016-09-251-1/+1
| | | | | | | | Otherwise we're missing the "expected to be a reference, value given" warning that appears for ordinary calls to call_user_func(). Also update an UPGRADING note with recent changes wrt call_user_func().
* Fixed bug #71539 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)Dmitry Stogov2016-07-071-2/+2
|
* Introduce new CHECK_VAR instruction to keep warnings about undefined variables.Dmitry Stogov2016-06-301-2/+2
|
* Implemented RFC: Fix inconsistent behavior of $this variableDmitry Stogov2016-06-161-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit bdd3b6895c3ce3eacfcf7d4bf4feb8dfa61801fd Author: Dmitry Stogov <dmitry@zend.com> Date: Thu Jun 16 00:19:42 2016 +0300 Fixed GOTO VM commit 2f1d7c8b89ce821086d357cf65f629f040a85c03 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 21:01:57 2016 +0300 Removed unused variable commit cf749c42b0b1919f70b1e7d6dcbfff76899506af Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 19:06:16 2016 +0300 Protection from $this reassign through mb_parse_str() commit 59a9a6c83c66b666971e57f1173b33a422166efd Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 18:14:50 2016 +0300 Added type inference rule for FETCH_THIS opcode commit 73f8d14a856f14a461430b3c7534ab2ce870cbf6 Author: Dmitry Stogov <dmitry@zend.com> Date: Wed Jun 15 18:11:18 2016 +0300 Restored PHP-7 behavior of isset($this->foo). It throws exception if not in object context. Removed useless opcode handlers. commit fa0881381e8ae97e022ae5d1ec0851c952f33c82 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 31 12:25:47 2016 +0300 Changed "Notice: Undefined variable: this" into "Exception: Using $this when not in object context". commit e32cc528c0f2c97963d8ec83eff0269f1f45af18 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue May 24 02:02:43 2016 +0300 Throw exception on attempt to re-assign $this through extract() and parse_str(). commit 41f1531b52113ec8a4c208aa6b9ef50f1386bb3f Author: Dmitry Stogov <dmitry@zend.com> Date: Mon May 23 22:18:36 2016 +0300 Fixed inconsistent $this behavior