summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-06-29 09:54:31 +0200
committerNikita Popov <nikita.ppv@gmail.com>2020-06-29 09:54:31 +0200
commit315ea609da2fd315bb76cb1275d152cfdaff607f (patch)
tree9559862f8e0011f5bcd80a417408d57b54c45026
parentbc62acf8740e042ecd0cd4b5bba0aeae4bac8fc7 (diff)
downloadphp-git-315ea609da2fd315bb76cb1275d152cfdaff607f.tar.gz
Remove restriction on method call inlining
In PHP 8, we are guaranteed that $this exists, so we no longer have to forbid this case.
-rw-r--r--ext/opcache/Optimizer/optimize_func_calls.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/ext/opcache/Optimizer/optimize_func_calls.c b/ext/opcache/Optimizer/optimize_func_calls.c
index 28a3c53489..c1ac58d0de 100644
--- a/ext/opcache/Optimizer/optimize_func_calls.c
+++ b/ext/opcache/Optimizer/optimize_func_calls.c
@@ -113,13 +113,6 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
return;
}
- if (fcall->opcode == ZEND_INIT_METHOD_CALL && fcall->op1_type == IS_UNUSED) {
- /* TODO: we can't inlne methods, because $this may be used
- * not in object context ???
- */
- return;
- }
-
for (i = 0; i < num_args; i++) {
/* Don't inline functions with by-reference arguments. This would require
* correct handling of INDIRECT arguments. */