diff options
author | Dmitry Stogov <dmitry@zend.com> | 2014-04-22 10:11:41 +0400 |
---|---|---|
committer | Dmitry Stogov <dmitry@zend.com> | 2014-04-22 10:11:41 +0400 |
commit | 022fee21661dfb2e402c5ad62b40e1f4afc9e82e (patch) | |
tree | e14f2a0708c25c123ea37925f355ff7ac6178f35 | |
parent | fa588a5c82c0264dc10862495c993a914a421667 (diff) | |
download | php-git-022fee21661dfb2e402c5ad62b40e1f4afc9e82e.tar.gz |
Cache knowledge about missing property_info
-rw-r--r-- | Zend/zend_object_handlers.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 7a14ce939a..9ec102fb15 100644 --- a/Zend/zend_object_handlers.c +++ b/Zend/zend_object_handlers.c @@ -266,7 +266,15 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui zend_property_info *scope_property_info; zend_bool denied_access = 0; - if (cache_slot != -1 && (property_info = CACHED_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce)) != NULL) { + if (cache_slot != -1 && ce == CACHED_PTR_EX(EG(active_op_array), cache_slot)) { + property_info = CACHED_PTR_EX(EG(active_op_array), cache_slot + 1); + if (!property_info) { + EG(std_property_info).flags = ZEND_ACC_PUBLIC; + EG(std_property_info).name = member; + EG(std_property_info).ce = ce; + EG(std_property_info).offset = -1; + property_info = &EG(std_property_info); + } return property_info; } @@ -331,6 +339,9 @@ static zend_always_inline struct _zend_property_info *zend_get_property_info_qui } } } else { + if (cache_slot != -1) { + CACHE_POLYMORPHIC_PTR_EX(EG(active_op_array), cache_slot, ce, NULL); + } EG(std_property_info).flags = ZEND_ACC_PUBLIC; EG(std_property_info).name = member; EG(std_property_info).ce = ce; |