com php-src: Cache knowledge about missing property_info: Zend/zend_object_handlers.c

From: Date: Tue, 22 Apr 2014 06:11:41 +0000
Subject: com php-src: Cache knowledge about missing property_info: Zend/zend_object_handlers.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-77326@lists.php.net to get a copy of this message
Commit: 022fee21661dfb2e402c5ad62b40e1f4afc9e82e Author: Dmitry Stogov <dmitry@zend.com> Tue, 22 Apr 2014 10:11:41 +0400 Parents: fa588a5c82c0264dc10862495c993a914a421667 Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=022fee21661dfb2e402c5ad62b40e1f4afc9e82e Log: Cache knowledge about missing property_info Changed paths: M Zend/zend_object_handlers.c Diff: diff --git a/Zend/zend_object_handlers.c b/Zend/zend_object_handlers.c index 7a14ce9..9ec102f 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;

« previous php.cvs (#77326) next »