Skip to content

Commit 44cbf31

Browse files
committed
Use more efficient argument passing opcode if possible
1 parent 9eae721 commit 44cbf31

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Zend/zend_compile.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3336,12 +3336,8 @@ uint32_t zend_compile_args(zend_ast *ast, zend_function *fbc) /* {{{ */
33363336
opcode = ZEND_SEND_VAR_NO_REF_EX;
33373337
}
33383338
}
3339-
} else if (zend_is_variable(arg)) {
3340-
if (zend_ast_is_short_circuited(arg)) {
3341-
// Must use SEND_VAL_EX to make sure the value isn't sent by ref
3342-
zend_compile_expr(&arg_node, arg);
3343-
opcode = ZEND_SEND_VAL_EX;
3344-
} else if (fbc) {
3339+
} else if (zend_is_variable(arg) && !zend_ast_is_short_circuited(arg)) {
3340+
if (fbc) {
33453341
if (ARG_SHOULD_BE_SENT_BY_REF(fbc, arg_num)) {
33463342
zend_compile_var(&arg_node, arg, BP_VAR_W, 1);
33473343
opcode = ZEND_SEND_REF;

0 commit comments

Comments
 (0)