Skip to content

Commit 7471c21

Browse files
committed
Optimized property access handlers. Removed EG(std_property_info).
1 parent 9935bf7 commit 7471c21

File tree

6 files changed

+112
-116
lines changed

6 files changed

+112
-116
lines changed

Zend/zend_API.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,9 +1248,9 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti
12481248

12491249
ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
12501250
property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC);
1251-
if (property_info &&
1252-
(property_info->flags & ZEND_ACC_STATIC) == 0 &&
1253-
property_info->offset >= 0) {
1251+
if (property_info != ZEND_WRONG_PROPERTY_INFO &&
1252+
property_info &&
1253+
(property_info->flags & ZEND_ACC_STATIC) == 0) {
12541254
ZVAL_COPY_VALUE(&object->properties_table[property_info->offset], prop);
12551255
ZVAL_INDIRECT(prop, &object->properties_table[property_info->offset]);
12561256
}
@@ -1267,9 +1267,9 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties
12671267

12681268
ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
12691269
property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC);
1270-
if (property_info &&
1271-
(property_info->flags & ZEND_ACC_STATIC) == 0 &&
1272-
property_info->offset >= 0) {
1270+
if (property_info != ZEND_WRONG_PROPERTY_INFO &&
1271+
property_info &&
1272+
(property_info->flags & ZEND_ACC_STATIC) == 0) {
12731273
zval_ptr_dtor(&object->properties_table[property_info->offset]);
12741274
ZVAL_COPY_VALUE(&object->properties_table[property_info->offset], prop);
12751275
zval_add_ref(&object->properties_table[property_info->offset]);

Zend/zend_globals.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,6 @@ struct _zend_executor_globals {
222222

223223
struct _zend_module_entry *current_module;
224224

225-
zend_property_info std_property_info;
226-
227225
zend_bool active;
228226
zend_bool valid_symbol_table;
229227

0 commit comments

Comments
 (0)