summaryrefslogtreecommitdiff
path: root/Zend/zend_vm_gen.php
Commit message (Collapse)AuthorAgeFilesLines
* Fix E_DEPRECATED in zend_vm_gen.phpMax Semenik2021-03-011-3/+4
| | | | | | | explode(): Passing null to parameter #2 ($string) of type string is deprecated Closes GH-6698.
* Avoid writing zend_vm_opcodes.h if it did not changeNikita Popov2021-02-171-54/+70
| | | | | | | | | | Now that we track header changes, a change to zend_vm_opcodes.h requires rebuilding essentially the whole tree. In most cases, changes to zend_vm_def.h don't actually result in any header changes though. Avoid touching the file by first checking whether the to be written contents are actually the same.
* Coding style tweaks for zend_vm_gen.phpAlex Erohin2021-02-171-31/+33
| | | | | | | | | - fixed array style for $vm_kind_name and $op_types - deleted unnecessary else statement for is_hot_helper function - fixed concatenation style - fixed style of using whitespace between "(" and switch/foreach - replaced !is_null with "!==" Closes GH-6704.
* Disable stack reuse optimization for x86 PIC code. It may clobber local ↵Dmitry Stogov2020-12-011-1/+1
| | | | variable used for Global Offset Table.
* Preallocate stack space for JIT in execute_ex() to eliminate JIT ↵Dmitry Stogov2020-11-301-7/+32
| | | | prologue/epilogue.
* Provide unused retvals to observersSammy Kaye Powers2020-11-171-0/+3
| | | | | | | Make sure that the return value is available to observers, even if it is not used by the caller. Closes GH-6422.
* [Observer] Save opline before calling begin/end handlersDmitry Stogov2020-11-111-0/+1
|
* Cleanup observer API and add JIT supportDmitry Stogov2020-09-181-5/+5
|
* Remove specialization of SPEC(OBSERVER) handlersSammy Kaye Powers2020-09-181-0/+34
|
* Add zend_observer APILevi Morrison2020-09-011-1/+36
| | | | | | | Closes GH-5857. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
* SAVE_OPLINE in NULL_HANDLERNikita Popov2020-08-111-0/+1
| | | | Let's avoid crashing before the nice error message gets printed...
* Implement named parametersNikita Popov2020-07-311-0/+18
| | | | | | | | | | | | | | | | | | From an engine perspective, named parameters mainly add three concepts: * The SEND_* opcodes now accept a CONST op2, which is the argument name. For now, it is looked up by linear scan and runtime cached. * This may leave UNDEF arguments on the stack. To avoid having to deal with them in other places, a CHECK_UNDEF_ARGS opcode is used to either replace them with defaults, or error. * For variadic functions, EX(extra_named_params) are collected and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS. RFC: https://wiki.php.net/rfc/named_params Closes GH-5357.
* Remove FREE_UNFETCHED conceptNikita Popov2020-07-091-36/+0
| | | | | | In master normal FREE_OPs work like FREE_UNFETCHED_OP used to, so there is no point in keeping this distinction anymore, it's just confusing.
* Assert exception set in HANDLE_EXCEPTION()Nikita Popov2020-07-071-8/+8
| | | | | | Some code paths were checking this manually, but we can turn this into a general assertion to avoid surprises (functions returning failure without throwing).
* Remove #undefs from vm_genNikita Popov2020-07-071-29/+0
| | | | | Possibly these were needed for VM_EXPORT, but they don't serve a purpose now.
* Remove ZEND_VM_EXPORT functionalityNikita Popov2020-07-071-103/+4
| | | | | This hasn't been used since forever and makes things more confusing than they already are.
* [ci skip] Various typo fixes in stub comments and CHANGES fileAyesh Karunaratne2020-06-251-3/+3
|
* Prevent CGG reordering if hanlers order is defined by zend_vm_order.txtDmitry Stogov2020-05-221-8/+12
|
* Remove spurious const qualifier from function return typeNikita Popov2020-02-061-1/+1
|
* Merge branch 'PHP-7.4'Nikita Popov2020-02-031-2761/+2761
|\ | | | | | | | | * PHP-7.4: Apply tidy formatting
| * Apply tidy formattingNikita Popov2020-02-031-2869/+2869
| | | | | | | | Mostly reindent PHP scripts to spaces.
* | Support the same handler for multiple opcodesTyson Andre2019-11-151-19/+12
| |
* | Optimize int === int/double === doubleTyson Andre2019-11-151-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do this by reusing the implementation used for `==` when both arguments are ints (IS_LONG) or both are floats (IS_DOUBLE) ```php // Before: nestedloop_ni took 0.442 seconds // After: nestedloop_ni takes 0.401 seconds (same as nestedloop_ne) function nestedloop_ni(int $k) { $x = 0; for ($i=0; $i < 50000000; $i++) { if ($i === $k) { $x++; } } print "$x\n"; } function nestedloop_ne(int $k) { $x = 0; for ($i=0; $i < 50000000; $i++) { if ($i == $k) { $x++; } } print "$x\n"; } ```
* | SAMRT BRANCH improvement.Dmitry Stogov2019-10-091-2/+2
| | | | | | | | | | Avoid need of insertion NOP opcoes between unrelated SMART BRANCH instruction and following JMPZ/JMPNZ. Now instead of checking the opcode of following instruction, the same information is encoded into SMART BRANH result_type.
* | Encapsulate all SMART BRANCH related logic inside macros. Result of SMART ↵Dmitry Stogov2019-10-081-3/+3
| | | | | | | | BRANCH may be uninitialized (on exception).
* | Throw Error when writing property of non-objectNikita Popov2019-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes object auto-vivification support. This also means that we can remove the corresponding special handling for typed properites: We no longer need to check that a property is convertible to stdClass if such a conversion might take place indirectly due to a nested property write. Additionally OBJ_W style operations now no longer modify the object operand, and as such we no longer need to treat op1 as a def in SSA form. The next step would be to actually compile the whole LHS of OBJ_W operations in R rather than W mode, but that causes issues with SimpleXML, whose object handlers depend on the current compilation structure. Part of https://wiki.php.net/rfc/engine_warnings.
* | Avoid code duplictionDmitry Stogov2019-09-261-65/+11
| |
* | ceanupDmitry Stogov2019-09-101-2/+2
| |
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-09-051-0/+3
|\ \ | |/ | | | | | | | | * PHP-7.4: Remove HOT attribute from some VM handlers. Comparisons almost always followed by JMPZ/JMPNZ; JMPZNZ is rare used. Remove --with-zlib-dir option from mysqlnd config
| * Remove HOT attribute from some VM handlers. Comparisons almost always ↵Dmitry Stogov2019-09-051-0/+3
| | | | | | | | followed by JMPZ/JMPNZ; JMPZNZ is rare used.
* | Simplify TMP/VAR operand releasingDmitry Stogov2019-07-241-154/+92
|/
* Try to fix macos buildNikita Popov2019-07-241-4/+2
| | | | | | | | | By avoiding unused variable opline warnings. Also clean up the replacement of ZEND_VM_SPEC -- we were sometimes treating it as an always-defined constant with a value (what it actually is) and sometimes as a conditionally defined constant (which it isn't, but which still worked thanks to the specializer). Switch to only treating it as a constant with a value.
* Fixed CALL VMDmitry Stogov2019-07-241-1/+1
|
* Avoid extra specialization for cold opcodesDmitry Stogov2019-07-171-0/+24
|
* Remove old hackDmitry Stogov2019-07-171-4/+0
|
* Slit INC/DEC opcodes into hot/cold parts and remove specialized versioins ↵Dmitry Stogov2019-07-161-1/+1
| | | | for LONG_OR_DOUBLE.
* Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-07-161-4/+4
|\ | | | | | | | | * PHP-7.3: Fixed incorrect specialization (missed IS_INDIRECT handling)
| * Merge branch 'PHP-7.2' into PHP-7.3Dmitry Stogov2019-07-161-4/+4
| |\ | | | | | | | | | | | | * PHP-7.2: Fixed incorrect specialization (missed IS_INDIRECT handling)
| | * Fixed incorrect specialization (missed IS_INDIRECT handling)Dmitry Stogov2019-07-161-4/+4
| | |
* | | Allow GOTO style helpers in HYBRID VMDmitry Stogov2019-07-121-10/+27
| | |
* | | Separate "cold" parts of comparison instructionsDmitry Stogov2019-07-111-0/+12
| | |
* | | Separate "cold" parts of binary op instructionsDmitry Stogov2019-07-111-6/+12
| | |
* | | Avoid unintended inliningDmitry Stogov2019-07-091-4/+32
| | |
* | | Remove duplicated code for (PRE|POST)_DEC_(OBJ|STATIC_PROP) opcodesDmitry Stogov2019-07-091-4/+32
| | |
* | | Fixed dispatch from inlined hybrid opcode to another opcodeDmitry Stogov2019-07-081-5/+1
| | |
* | | Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ↵Dmitry Stogov2019-07-051-117/+2
| | | | | | | | | | | | ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
* | | Introduce and use ZEND_VM_INLINE_HANDLER() to avoid ZEND_RETURN exceptionDmitry Stogov2019-07-041-5/+6
| | |
* | | Micro-optimizationDmitry Stogov2019-07-011-0/+17
| | |
* | | Revert "micro-optimization"Joe Watkins2019-06-121-17/+0
| | | | | | | | | | | | This reverts commit 374f7699821eb723a3a82a9854d18c0530b9d4e9.
* | | micro-optimizationDmitry Stogov2019-06-101-0/+17
| | |