Skip to content

Commit b2cf43a

Browse files
committed
Update zend_jit_trace_record_fake_init_call_ex() accordingly
1 parent 6f0b4a8 commit b2cf43a

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

ext/opcache/jit/zend_jit_vm_helpers.c

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -508,23 +508,14 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
508508
}
509509

510510
func = call->func;
511-
if (func->common.fn_flags & (ZEND_ACC_CALL_VIA_TRAMPOLINE|ZEND_ACC_NEVER_CACHE)) {
512-
/* TODO: Can we continue recording ??? */
513-
return -1;
514-
}
515-
/* Function is a property hook. */
516-
if (func->common.prop_info) {
517-
/* TODO: Can we continue recording ??? */
518-
return -1;
519-
}
520511
if (func->type == ZEND_INTERNAL_FUNCTION
521512
&& (func->op_array.fn_flags & (ZEND_ACC_CLOSURE|ZEND_ACC_FAKE_CLOSURE))) {
522513
return -1;
523514
}
524515
if (func->type == ZEND_USER_FUNCTION) {
525516
jit_extension =
526517
(zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(&func->op_array);
527-
if (UNEXPECTED(!jit_extension && (func->op_array.fn_flags & ZEND_ACC_CLOSURE))
518+
if (UNEXPECTED(!jit_extension && (func->op_array.fn_flags & ZEND_ACC_CLOSURE))
528519
|| (jit_extension && !(jit_extension->func_info.flags & ZEND_FUNC_JIT_ON_HOT_TRACE))
529520
|| (func->op_array.fn_flags & ZEND_ACC_FAKE_CLOSURE)) {
530521
return -1;
@@ -533,7 +524,13 @@ static int zend_jit_trace_record_fake_init_call_ex(zend_execute_data *call, zend
533524
func = (zend_function*)jit_extension->op_array;
534525
}
535526
}
536-
if (is_megamorphic == ZEND_JIT_EXIT_POLYMORPHISM
527+
528+
if ((func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)
529+
|| (func->common.fn_flags & ZEND_ACC_NEVER_CACHE)
530+
|| func->common.prop_info) {
531+
/* continue recording */
532+
func = NULL;
533+
} else if (is_megamorphic == ZEND_JIT_EXIT_POLYMORPHISM
537534
/* TODO: use more accurate check ??? */
538535
&& ((ZEND_CALL_INFO(call) & ZEND_CALL_DYNAMIC)
539536
|| func->common.scope)) {

0 commit comments

Comments
 (0)