Skip to content

Commit a0fafcf

Browse files
committed
Call zend_jit_op_array() for hooks
1 parent 677e191 commit a0fafcf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/opcache/zend_persist.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,13 @@ static zend_property_info *zend_persist_property_info(zend_property_info *prop)
811811
for (uint32_t i = 0; i < ZEND_PROPERTY_HOOK_COUNT; i++) {
812812
if (prop->hooks[i]) {
813813
zend_op_array *hook = zend_persist_class_method(&prop->hooks[i]->op_array, ce);
814+
#ifdef HAVE_JIT
815+
if (JIT_G(on) && JIT_G(opt_level) <= ZEND_JIT_LEVEL_OPT_FUNCS) {
816+
if (hook->scope == ce && !(hook->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
817+
zend_jit_op_array(hook, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
818+
}
819+
}
820+
#endif
814821
zend_property_info *new_prop_info = (zend_property_info *) zend_shared_alloc_get_xlat_entry(hook->prop_info);
815822
if (new_prop_info) {
816823
hook->prop_info = new_prop_info;

0 commit comments

Comments
 (0)