Skip to content

Commit 8f02d7b

Browse files
committed
Remove unnecessary bailout in fcall optimization
Even if we can't optimize the SEND_VAL_EX, there is no reason to skip the INIT_FCALL/DO_FCALL optimizations, those should be entirely orthogonal.
1 parent a8b6aea commit 8f02d7b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Zend/Optimizer/optimize_func_calls.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,7 @@ void zend_optimize_func_calls(zend_op_array *op_array, zend_optimizer_ctx *ctx)
264264
}
265265

266266
if (has_known_send_mode(&call_stack[call - 1], opline->op2.num)) {
267-
if (ARG_MUST_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
268-
/* We won't convert it into_DO_FCALL to emit error at run-time */
269-
call_stack[call - 1].opline = NULL;
270-
} else {
267+
if (!ARG_MUST_BE_SENT_BY_REF(call_stack[call - 1].func, opline->op2.num)) {
271268
opline->opcode = ZEND_SEND_VAL;
272269
}
273270
}

0 commit comments

Comments
 (0)