Skip to content

Commit

Permalink
Optimized property access handlers. Removed EG(std_property_info).
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Oct 17, 2014
1 parent 9935bf7 commit 7471c21
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 116 deletions.
12 changes: 6 additions & 6 deletions Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,9 +1248,9 @@ ZEND_API void object_properties_init_ex(zend_object *object, HashTable *properti

ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC);
if (property_info &&
(property_info->flags & ZEND_ACC_STATIC) == 0 &&
property_info->offset >= 0) {
if (property_info != ZEND_WRONG_PROPERTY_INFO &&
property_info &&
(property_info->flags & ZEND_ACC_STATIC) == 0) {
ZVAL_COPY_VALUE(&object->properties_table[property_info->offset], prop);
ZVAL_INDIRECT(prop, &object->properties_table[property_info->offset]);
}
Expand All @@ -1267,9 +1267,9 @@ ZEND_API void object_properties_load(zend_object *object, HashTable *properties

ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
property_info = zend_get_property_info(object->ce, key, 1 TSRMLS_CC);
if (property_info &&
(property_info->flags & ZEND_ACC_STATIC) == 0 &&
property_info->offset >= 0) {
if (property_info != ZEND_WRONG_PROPERTY_INFO &&
property_info &&
(property_info->flags & ZEND_ACC_STATIC) == 0) {
zval_ptr_dtor(&object->properties_table[property_info->offset]);
ZVAL_COPY_VALUE(&object->properties_table[property_info->offset], prop);
zval_add_ref(&object->properties_table[property_info->offset]);
Expand Down
2 changes: 0 additions & 2 deletions Zend/zend_globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,6 @@ struct _zend_executor_globals {

struct _zend_module_entry *current_module;

zend_property_info std_property_info;

zend_bool active;
zend_bool valid_symbol_table;

Expand Down
Loading

0 comments on commit 7471c21

Please sign in to comment.