Skip to content

Commit 1105f40

Browse files
committed
For unpacks, we should also assume there may be named args
1 parent 2096a61 commit 1105f40

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
@@ -8558,13 +8558,11 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
85588558
#endif
85598559
}
85608560

8561-
if ((opline-1)->opcode == ZEND_SEND_UNPACK|| (opline-1)->opcode == ZEND_SEND_ARRAY) {
8562-
unknown_num_args = 1;
8563-
}
8564-
8565-
bool has_named_args = opline->extended_value == ZEND_FCALL_HAS_NAMED_ARGS;
8566-
if (has_named_args) {
8561+
bool may_have_named_args = 0;
8562+
if ((opline-1)->opcode == ZEND_SEND_UNPACK || (opline-1)->opcode == ZEND_SEND_ARRAY ||
8563+
opline->extended_value == ZEND_FCALL_HAS_NAMED_ARGS) {
85678564
unknown_num_args = 1;
8565+
may_have_named_args = 1;
85688566
}
85698567

85708568
if (info) {
@@ -8872,7 +8870,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
88728870
| mov ecx, dword [FP + offsetof(zend_execute_data, This.u2.num_args)] // reload
88738871
| jmp >1
88748872
|.code
8875-
if (!has_named_args &&
8873+
if (!may_have_named_args &&
88768874
(!func || (func->op_array.fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0)) {
88778875
if (!func) {
88788876
| // if (EXPECTED((op_array->fn_flags & ZEND_ACC_HAS_TYPE_HINTS) == 0))

0 commit comments

Comments
 (0)