Skip to content

Commit 713d3ea

Browse files
committed
Don't skip fcall guard for method calls from trait
1 parent 44384df commit 713d3ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ext/opcache/jit/zend_jit_trace.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4549,6 +4549,14 @@ static const void *zend_jit_trace(zend_jit_trace_rec *trace_buffer, uint32_t par
45494549

45504550
while (call_info) {
45514551
if (call_info->caller_init_opline == init_opline) {
4552+
if (op_array->fn_flags & ZEND_ACC_TRAIT_CLONE) {
4553+
if (init_opline->opcode == ZEND_INIT_STATIC_METHOD_CALL
4554+
&& init_opline->op1_type != IS_CONST) {
4555+
break;
4556+
} else if (init_opline->opcode == ZEND_INIT_METHOD_CALL) {
4557+
break;
4558+
}
4559+
}
45524560
skip_guard = 1;
45534561
break;
45544562
}

0 commit comments

Comments
 (0)