Skip to content

Commit a066b80

Browse files
committed
Skip abstract methods
1 parent 2759e6b commit a066b80

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Zend/Optimizer/zend_optimizer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,7 @@ void zend_foreach_op_array(zend_script *script, zend_op_array_func_t func, void
14151415
ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, op_array) {
14161416
if (op_array->scope == ce
14171417
&& op_array->type == ZEND_USER_FUNCTION
1418+
&& !(op_array->fn_flags & ZEND_ACC_ABSTRACT)
14181419
&& !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
14191420
zend_foreach_op_array_helper(op_array, func, context);
14201421
}

ext/opcache/zend_persist.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@ static void zend_accel_persist_class_table(HashTable *class_table)
12621262
ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, op_array) {
12631263
if (op_array->type == ZEND_USER_FUNCTION) {
12641264
if (op_array->scope == ce
1265+
&& !(op_array->fn_flags & ZEND_ACC_ABSTRACT)
12651266
&& !(op_array->fn_flags & ZEND_ACC_TRAIT_CLONE)) {
12661267
zend_jit_op_array(op_array, ZCG(current_persistent_script) ? &ZCG(current_persistent_script)->script : NULL);
12671268
for (uint32_t i = 0; i < op_array->num_dynamic_func_defs; i++) {
@@ -1276,7 +1277,8 @@ static void zend_accel_persist_class_table(HashTable *class_table)
12761277
if (EXPECTED(Z_TYPE(p->val) != IS_ALIAS_PTR)) {
12771278
ce = Z_PTR(p->val);
12781279
ZEND_HASH_MAP_FOREACH_PTR(&ce->function_table, op_array) {
1279-
if (op_array->type == ZEND_USER_FUNCTION) {
1280+
if (op_array->type == ZEND_USER_FUNCTION
1281+
&& !(op_array->fn_flags & ZEND_ACC_ABSTRACT)) {
12801282
if ((op_array->scope != ce
12811283
|| (op_array->fn_flags & ZEND_ACC_TRAIT_CLONE))
12821284
&& (JIT_G(trigger) == ZEND_JIT_ON_FIRST_EXEC

0 commit comments

Comments
 (0)