summaryrefslogtreecommitdiff
path: root/ext/opcache/Optimizer/optimize_func_calls.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed issues related to optimization and persitence of classes linked with ↵Dmitry Stogov2018-11-141-0/+2
| | | | interfaces, traits or internal classes.
* Future-proof email addresses...Zeev Suraski2018-11-011-1/+1
|
* Fix some misspellingsGabriel Caruso2018-02-061-1/+1
|
* Moved "zval.u2.cache_slot" into free room of "zend_op"Dmitry Stogov2018-02-051-2/+0
|
* Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and ↵Dmitry Stogov2018-02-051-3/+13
| | | | 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).
* Use reference-counting instead of duplication and separation, if really ↵Dmitry Stogov2018-01-191-1/+1
| | | | necessary.
* year++Xinchen Hui2018-01-021-1/+1
|
* Always use IS_CONSTANT_AST (IS_CONSTANT is removed).Dmitry Stogov2017-10-101-1/+1
|
* Changed the way VM accesses constant operands in 64-bit builds.Dmitry Stogov2017-10-041-2/+2
|
* Get rid of old compatibility macrosDmitry Stogov2017-07-041-2/+2
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Don't inline if function has ref argumentsNikita Popov2016-11-121-6/+16
| | | | | Otherwise we end up leaving opcodes like FETCH_DIM_W behind. The test case demonstrates a leak in particular.
* Allow early-binding of ZEND_NEW argsNikita Popov2016-11-101-3/+4
|
* Merge branch 'PHP-7.0' into PHP-7.1Nikita Popov2016-11-101-0/+8
|\
| * Fcall optimization: Avoid FETCH_DIM_R with UNUSED op2Nikita Popov2016-11-101-0/+7
| |
* | Prevent inlining through call_user_func() and call_user_func_array()Dmitry Stogov2016-07-011-11/+8
| |
* | Introduce new CHECK_VAR instruction to keep warnings about undefined variables.Dmitry Stogov2016-06-301-1/+5
| |
* | Disable inlining for $this->foo(), because $this may be not in object contextDmitry Stogov2016-06-301-1/+1
| |
* | Disable inlining for $this->foo(), because $this may be used not in object ↵Dmitry Stogov2016-06-301-0/+6
| | | | | | | | context
* | Fix RT_CONSTANT_EX typoNikita Popov2016-06-301-2/+2
| |
* | Inline simple constant functionsDmitry Stogov2016-06-301-2/+93
| |
* | Split ZEND_SEND_VAR_NO_REF into ZEND_SEND_VAR_NO_REF and ↵Dmitry Stogov2016-05-311-6/+7
| | | | | | | | ZEND_SEND_VAR_NO_REF_EX (similar to ZEND_SEND_VAL) and remove ZEND_ARG_* flags.
* | Support known static/method calls in call graphNikita Popov2016-04-271-44/+2
| | | | | | | | | | For this purpose extract the function lookup call into a helper zend_optimizer_get_called_func().
* | Ct bind private/final $this method call argsNikita Popov2016-04-271-2/+21
| | | | | | | | The test covers two edge-cases wrt opcache support.
* | Use DO_FCALL_BY_NAME instead of DO_FCALL, if possibleDmitry Stogov2016-04-141-2/+2
| |
* | Fix static method arg binding in traitsNikita Popov2016-04-081-0/+1
| |
* | Fix FETCH_CLASS_SELF comparisonsNikita Popov2016-03-261-1/+1
| | | | | | | | Turns out those don't form a bitfield.
* | Statically bind static method call argumentsNikita Popov2016-03-141-2/+24
| | | | | | | | | | | | | | If we know what method will be called, use ct-bound send opcodes. The intl test is changed because a runtime error changed to a compile-time error.
* | Improve the namesXinchen Hui2016-01-251-1/+1
| |
* | Merge branch 'PHP-7.0'Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | | | | | * PHP-7.0: Update header to PHP Version 7 Happy new year (Update copyright to 2016) Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
* | Speed up fetching of class entries for self:: parent:: and static::Dmitry Stogov2015-10-281-2/+11
|/ | | | | | | | | | | | | | | | | | | | | | This is generalized solution for Bob's idea of speed up self::method() calls without ZEND_FETCH_CLASS. At first, it adds few new opcodes to separate class related behaviour: FETCH_STATIC_PROP_R FETCH_STATIC_PROP_W FETCH_STATIC_PROP_RW FETCH_STATIC_PROP_FUNC_ARG FETCH_STATIC_PROP_UNSET FETCH_STATIC_PROP_IS UNSET_STATIC_PROP ISSET_ISEMPTY_STATIC_PROP FETCH_CLASS_CONSTANT At seconds, it enables IS_UNUSED operand to fetch (self, parent or static without separate FETCH_CLASS) for new opcodes and the following ones: INIT_STATIC_METHOD_CALL NEW END_INSTANCEOF Finaly, opcache optimizer had to be fixed to support new opcodes.
* Merge branch 'PHP-5.6'Xinchen Hui2015-03-041-2/+2
|\
| * Fixed bug #69159 (Opcache causes problem when passing a variable variable to ↵Xinchen Hui2015-03-041-2/+2
| | | | | | | | a function)
* | Added specialized versions of DO_FCALL handler:Dmitry Stogov2015-02-251-0/+5
| | | | | | | | | | | | DO_ICALL - for internal functions DO_UCALL - for user functions DO_FCALL_BY_NAME - plain, most probably user, funcstions (not methods)
* | Split INIT_FCALL_BY_NAME inti INIT_FCALL_BY_NAME(CONST+STRING) and ↵Dmitry Stogov2015-02-241-0/+1
| | | | | | | | INIT_DYNAMIC_CALL(CONST-STRING|TMPVAR|CV)
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | trailing whitespace removalStanislav Malyshev2015-01-101-2/+2
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-1/+1
| |
* | Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in ↵Dmitry Stogov2014-12-121-11/+2
| | | | | | | | opline->op1.num to avoid its recalculation on each execution.
* | SEND_VAR_NO_REF optimizationDmitry Stogov2014-11-181-2/+0
| |
* | Refactored optimizer (compile different opimizer passes separately, instead ↵Dmitry Stogov2014-08-281-1/+10
| | | | | | | | of including *.c file)
* | Fixed incorrect ZEND_INIT_FCALL_BY_NAME -> ZEND_INIT_FCALL conversionDmitry Stogov2014-08-271-2/+2
| |
* | Merge remote-tracking branch 'php-src/master' into astNikita Popov2014-08-161-4/+19
|\ \ | | | | | | | | | | | | Conflicts: ext/opcache/Optimizer/optimize_func_calls.c
| * | Add copyright headerXinchen Hui2014-08-151-0/+19
| | |
| * | Remove old version PHP supportsXinchen Hui2014-08-151-5/+0
| | |
* | | ZEND_INIT_FCALL_BY_NAME can have non-string literalNikita Popov2014-08-151-2/+6
|/ /
* | Implement call_user_func() and call_user_func_array() using special opcodes.Dmitry Stogov2014-07-111-0/+1
| | | | | | | | In some rare cases it leads to insignificant changes in error messages.
* | ZEND_SEND_VAR and ZEND_SEND_VAL specializationDmitry Stogov2014-07-081-7/+13
| |
* | Refactored parameter passing mechanism.Dmitry Stogov2014-06-301-21/+28
| | | | | | | | | | | | | | | | | | | | | | In PHP-5.6 and below each argument passed to user function was copies on VM stack twice. Now we always have ZEND_INIT_FCALL (or simular) opcode that pushes "call frame" on top of VM stack. "Call frame" is actually the same zend_execute_data structure. All the following ZEND_SEND instructions push arguments on top of the stack in a way that they directly comes into corresponding CV variables of the called frame. Extra arguments are copied at the end of stack frame (after all CV and TMP variables) on function enterance. There are two minor incompatibilities: 1) It's not allowed to decalre functions redefining arguments e.g. "function foo($a,$a) {}". 2) func_get_arg() and func_get args() return the current value of argument and not the original value that was sent.