Skip to content

Commit 315ea60

Browse files
committed
Remove restriction on method call inlining
In PHP 8, we are guaranteed that $this exists, so we no longer have to forbid this case.
1 parent bc62acf commit 315ea60

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

ext/opcache/Optimizer/optimize_func_calls.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,6 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
113113
return;
114114
}
115115

116-
if (fcall->opcode == ZEND_INIT_METHOD_CALL && fcall->op1_type == IS_UNUSED) {
117-
/* TODO: we can't inlne methods, because $this may be used
118-
* not in object context ???
119-
*/
120-
return;
121-
}
122-
123116
for (i = 0; i < num_args; i++) {
124117
/* Don't inline functions with by-reference arguments. This would require
125118
* correct handling of INDIRECT arguments. */

0 commit comments

Comments
 (0)