Skip to content

Commit aea85c6

Browse files
committed
Prevent inlining of method copied from trait
1 parent 36b644f commit aea85c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/opcache/Optimizer/optimize_func_calls.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ static void zend_try_inline_call(zend_op_array *op_array, zend_op *fcall, zend_o
9595
{
9696
if (func->type == ZEND_USER_FUNCTION
9797
&& !(func->op_array.fn_flags & (ZEND_ACC_ABSTRACT|ZEND_ACC_HAS_TYPE_HINTS))
98+
/* TODO: function copied from trait may be inconsistent ??? */
99+
&& !(func->op_array.fn_flags & (ZEND_ACC_TRAIT_CLONE))
98100
&& fcall->extended_value >= func->op_array.required_num_args
99101
&& func->op_array.opcodes[func->op_array.num_args].opcode == ZEND_RETURN) {
100102

0 commit comments

Comments
 (0)