Skip to content

Commit 25bbdcc

Browse files
committed
fixup! Improve error message for 'Cannot pass parameter by reference'
1 parent ce6b2ad commit 25bbdcc

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ext/opcache/jit/zend_jit_x86.dasc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,7 +1849,11 @@ static int zend_jit_throw_cannot_pass_by_ref_stub(dasm_State **Dst)
18491849
| mov EX->call, RX
18501850
|1:
18511851
| mov RX, r0
1852+
|.if X64
18521853
| mov CARG1d, dword OP:r0->op2.num
1854+
|.else
1855+
| mov CARG1d, OP:r0->op2.num
1856+
|.endif
18531857
| EXT_CALL zend_jit_cannot_pass_by_reference, r0
18541858
| cmp byte OP:RX->op1_type, IS_TMP_VAR
18551859
| jne >9
@@ -8908,7 +8912,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
89088912
}
89098913

89108914
if (call_num_args <= func->op_array.num_args) {
8911-
if (!trace || (trace->op == ZEND_JIT_TRACE_END
8915+
if (!trace || (trace->op == ZEND_JIT_TRACE_END
89128916
&& trace->stop == ZEND_JIT_TRACE_STOP_INTERPRETER)) {
89138917
uint32_t num_args;
89148918

@@ -8957,7 +8961,7 @@ static int zend_jit_do_fcall(dasm_State **Dst, const zend_op *opline, const zend
89578961
}
89588962
}
89598963
} else {
8960-
if (!trace || (trace->op == ZEND_JIT_TRACE_END
8964+
if (!trace || (trace->op == ZEND_JIT_TRACE_END
89618965
&& trace->stop == ZEND_JIT_TRACE_STOP_INTERPRETER)) {
89628966
if (func && zend_accel_in_shm(func->op_array.opcodes)) {
89638967
| LOAD_IP_ADDR (func->op_array.opcodes)

ext/opcache/tests/optimize_func_calls.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ Array
105105
(
106106
[0] => A Object
107107
(
108-
[obj] =>
108+
[obj] =>
109109
)
110110

111111
)
112112
Array
113113
(
114-
[0] =>
114+
[0] =>
115115
)
116116
string(7) "changed"
117117
Array

0 commit comments

Comments
 (0)