summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/zend_dump.c
Commit message (Collapse)AuthorAgeFilesLines
* Move optimizer into coreNikita Popov2021-01-281-1239/+0
| | | | | | | | | | This only moves the files, adjusts the build system, exports APIs and does minor fixups to make sure the code builds. This does not yet try to make the optimizer usable independently of opcache. Closes GH-6642.
* Remove unused flagDmitry Stogov2020-12-141-5/+0
|
* Use MIN/MAX when dumping RANGE[]Nikita Popov2020-11-201-0/+4
| | | | | | It's very common that one of the bounds is LONG_MIN or LONG_MAX. Dump them as MIN/MAX instead of the int representation in that case, as it makes the dump less noisy.
* Avoid priniting "array [long, string] of"Dmitry Stogov2020-08-251-1/+2
|
* Remove more unused func_info fieldsNikita Popov2020-07-301-8/+0
|
* Remove unused recv_arg_info from func_infoNikita Popov2020-07-301-11/+0
|
* Remove unused func_info variableNikita Popov2020-07-271-3/+0
|
* Remove unused fieldsDmitry Stogov2020-07-271-3/+0
|
* Implement match expressionIlija Tovilo2020-07-091-1/+5
| | | | | | RFC: https://wiki.php.net/rfc/match_expression_v2 Closes GH-5371.
* Add new line before basic-block labels (except for the first BB0)Dmitry Stogov2020-03-251-0/+3
|
* Always print numeric opline numbersDmitry Stogov2020-03-251-97/+26
|
* Make SSA dump format controlled by opcache.jit_debug more readable (always ↵Dmitry Stogov2020-03-241-16/+63
| | | | | | print opcode number). This doesn't affect dumps controlled by opcache.opt_debug_level.
* Tracing JIT (it doesn't support register allocation yet)Dmitry Stogov2020-03-131-26/+33
| | | | | Use opcache.jit=1255 to swith it on (the third digit 5 really matters) Use opcache.jit_debug=0xff001 to see how it works and what code it generates
* Export zend_dump_op() and add ZEND_DUMP_NUMERIC_OPLINES flag to print ↵Dmitry Stogov2020-01-311-19/+54
| | | | oplines as "dddd" instead of "Ld+"
* Optimize $x === null into is_null($x)Dmitry Stogov2019-11-121-1/+2
|
* Use RT_CONSTANT() or CT_CONSTANT() macro depending on ZEND_ACC_DONE_PASS_TWO ↵Dmitry Stogov2019-10-111-3/+3
| | | | flag
* typo and cleanupDmitry Stogov2019-10-091-1/+1
|
* SAMRT BRANCH improvement.Dmitry Stogov2019-10-091-1/+7
| | | | | 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.
* Remove most uses of the ERROR typeNikita Popov2019-09-301-4/+0
| | | | | | | | | It is now only used to signal exceptions for property reads. ERROR zvals are never returned back to the VM anymore, so there's no need to check for them when receiving a VAR. Also return MAY_BE_ERROR, as ERROR is now no longer relevant for inference.
* Throw Error when writing property of non-objectNikita Popov2019-09-271-3/+1
| | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'PHP-7.4'Dmitry Stogov2019-07-051-8/+2
|\ | | | | | | | | * PHP-7.4: Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
| * Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ↵Dmitry Stogov2019-07-051-8/+2
| | | | | | | | ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
* | Merge branch 'PHP-7.4'Dmitry Stogov2019-05-221-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fixed dump of constant flags
| * Merge branch 'PHP-7.3' into PHP-7.4Dmitry Stogov2019-05-221-1/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fixed dump of constant flags
| | * Fixed dump of constant flagsDmitry Stogov2019-05-221-1/+1
| | |
| | * Future-proof email addressesZeev Suraski2018-11-011-1/+1
| | |
* | | Merge branch 'PHP-7.4'Dmitry Stogov2019-04-121-0/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Replace "ZEND_CALL_CTOR" hack by additional live-range
| * | Replace "ZEND_CALL_CTOR" hack by additional live-rangeDmitry Stogov2019-04-121-0/+6
| | |
* | | Don't split basic block after RECV, if function checks type hintsDmitry Stogov2019-04-091-0/+3
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2019-02-191-2/+5
|\ \ \ | |/ /
| * | ZEND_COMPILE_EXTENDED_INFO split Currently a tool may not decide between ↵Joe Watkins2019-02-191-2/+5
| | | | | | | | | | | | debugging and profiling behaviour: We split ZEND_COMPILE_EXTENDED_INFO into ZEND_COMPILE_EXTENDED_FCALL and ZEND_COMPILE_EXTENDED_STMT We define ZEND_COMPILE_EXTENDED_INFO as ZEND_COMPILE_EXTENDED_STMT|ZEND_COMPILE_EXTENDED_FCALL
* | | Merge branch 'PHP-7.4'Dmitry Stogov2019-02-051-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove copyright years.
| * | Remove copyright years.Dmitry Stogov2019-02-051-1/+1
| | |
* | | Merge branch 'PHP-7.4'Peter Kokot2019-02-031-8/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove local variables
| * | Remove local variablesPeter Kokot2019-02-031-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* | | Remove bareword fallback for constantsNikita Popov2019-01-311-5/+2
|/ / | | | | | | | | | | | | | | | | Access to undefined constants will now always result in an Error exception being thrown. This required quite a few test changes, because there were many buggy tests that unintentionally used bareword fallback in combination with error suppression.
* | Implement single-pass live range calculationNikita Popov2019-01-211-19/+9
| | | | | | | | | | | | | | | | Instead of interleaving creation of live-ranges with the main compiler code, compute them in a separate pass over the opcodes as part of pass_two. Additionally, do not keep live ranges synchronized during optimization in opcache and instead use the same mechanism to recompute them after optimization.
* | Implement typed propertiesNikita Popov2019-01-111-1/+13
| | | | | | | | | | | | | | | | | | | | 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>
* | Future-proof email addresses...Zeev Suraski2018-11-011-1/+1
|/
* Fixed ISSET/ISEMPTY bit meaning to simplify run-time checksDmitry Stogov2018-05-311-1/+1
|
* Avoid live range references in opcodesNikita Popov2018-02-161-4/+0
| | | | | | | | 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.
* Moved "zval.u2.cache_slot" into free room of "zend_op"Dmitry Stogov2018-02-051-1/+1
|
* Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and ↵Dmitry Stogov2018-02-051-13/+6
| | | | 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).
* typoDmitry Stogov2018-02-011-1/+1
|
* Changed CATCH instruction format (extended_value moved into op2, op2 into ↵Dmitry Stogov2018-01-311-10/+10
| | | | result, result into extended_value)
* Changed FETCH_CONSTANT instruction format (extended_value moved into op1)Dmitry Stogov2018-01-311-7/+7
|
* Changed FETCH_CLASS instruction format (extended_value moved into op1)Dmitry Stogov2018-01-311-2/+0
|
* Change FETCH/ISSET instruction modifiers:Dmitry Stogov2018-01-301-1/+1
| | | | | | | - 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
* year++Xinchen Hui2018-01-021-1/+1
|
* TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.Dmitry Stogov2017-11-231-0/+36
| | | | This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))