Skip to content

Commit afc46ab

Browse files
committed
For unpacks, we should also assume there may be named args
1 parent f89933d commit afc46ab

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8567,13 +8567,11 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
85678567
#endif
85688568
}
85698569

8570-
if ((opline-1)->opcode == ZEND_SEND_UNPACK|| (opline-1)->opcode == ZEND_SEND_ARRAY) {
8571-
unknown_num_args = 1;
8572-
}
8573-
8574-
bool has_named_args = opline->extended_value == ZEND_FCALL_HAS_NAMED_ARGS;
8575-
if (has_named_args) {
8570+
bool may_have_named_args = 0;
8571+
if ((opline-1)->opcode == ZEND_SEND_UNPACK || (opline-1)->opcode == ZEND_SEND_ARRAY ||
8572+
opline->extended_value == ZEND_FCALL_HAS_NAMED_ARGS) {
85768573
unknown_num_args = 1;
8574+
may_have_named_args = 1;
85778575
}
85788576

85798577
if (info) {
@@ -8881,7 +8879,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
88818879
| mov ecx, dword [FP + offsetof(zend_execute_data, This.u2.num_args)] // reload
88828880
| jmp >1
88838881
|.code
8884-
if (!has_named_args &&
8882+
if (!may_have_named_args &&
88858883
(!func || (func->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
88868884
if (!func) {
88878885
| // if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0))

0 commit comments

Comments
 (0)