Skip to content

Commit

Permalink
Remove restriction on method call inlining
Browse files Browse the repository at this point in the history
In PHP 8, we are guaranteed that $this exists, so we no longer have
to forbid this case.
  • Loading branch information
nikic committed Jun 29, 2020
1 parent bc62acf commit 315ea60
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions ext/opcache/Optimizer/optimize_func_calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit 315ea60

Please sign in to comment.