Skip to content

Commit 08265fc

Browse files
committed
perf(optimizer): skip non-clone hooked properties before HT lookup
Signed-off-by: azjezz <azjezz@protonmail.com>
1 parent f8088c8 commit 08265fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Zend/Optimizer/zend_optimizer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1751,12 +1751,12 @@ ZEND_API void zend_optimize_script(zend_script *script, zend_long optimization_l
17511751

17521752
zend_property_info *prop;
17531753
ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&ce->properties_info, name, prop) {
1754-
if (prop->ce == ce || !prop->hooks) {
1754+
if (!(prop->flags & ZEND_ACC_GENERIC_CLONE) || !prop->hooks) {
17551755
continue;
17561756
}
17571757

17581758
const zend_property_info *parent_prop = zend_hash_find_ptr(&prop->ce->properties_info, name);
1759-
if (!parent_prop || parent_prop == prop || !parent_prop->hooks) {
1759+
if (!parent_prop || !parent_prop->hooks) {
17601760
continue;
17611761
}
17621762

0 commit comments

Comments
 (0)