com php-src: Revert "Speed up self::$property access by 20%": Zend/zend_compile.c

From: Date: Tue, 06 Oct 2015 20:48:04 +0000
Subject: com php-src: Revert "Speed up self::$property access by 20%": Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89307@lists.php.net to get a copy of this message
Commit: 5a49ac77aabd742462f213f74c695b96f717794a Author: Dmitry Stogov <dmitry@zend.com> Tue, 6 Oct 2015 23:48:04 +0300 Parents: 1198c5d8bb5da43b0b275dae1af594a88e2a8a33 Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5a49ac77aabd742462f213f74c695b96f717794a Log: Revert "Speed up self::$property access by 20%" This reverts commit 0fbd3e5fe7c2df5f8eb8cf2f217902f80a9fd894. Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 56d946b..6d8f794 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -2368,21 +2368,12 @@ zend_op *zend_compile_static_prop_common(znode *result, zend_ast *ast, uint32_t znode class_node, prop_node; zend_op *opline; - uint32_t fetch_type = class_ast->kind == ZEND_AST_ZVAL ? zend_get_class_fetch_type_ast(class_ast) : -1; - if (fetch_type == ZEND_FETCH_CLASS_DEFAULT) { + if (zend_is_const_default_class_ref(class_ast)) { class_node.op_type = IS_CONST; ZVAL_STR(&class_node.u.constant, zend_resolve_class_name_ast(class_ast)); } else { - /* we do not have any reference to the extends_ast/name of parent at compile-time, hence only resolving self:: for now */ - if (zend_is_scope_known() && fetch_type == ZEND_FETCH_CLASS_SELF) { - zend_ensure_valid_class_fetch_type(fetch_type); - - class_node.op_type = IS_CONST; - ZVAL_STR_COPY(&class_node.u.constant, CG(active_class_entry)->name); - } else { - zend_compile_class_ref(&class_node, class_ast, 1); - } + zend_compile_class_ref(&class_node, class_ast, 1); } zend_compile_expr(&prop_node, prop_ast); @@ -3324,7 +3315,7 @@ void zend_compile_static_call(znode *result, zend_ast *ast, uint32_t type) /* {{ class_node.op_type = IS_CONST; ZVAL_STR_COPY(&class_node.u.constant, CG(active_class_entry)->name); } else { - zend_compile_class_ref(&class_node, class_ast, 1); + opline = zend_compile_class_ref(&class_node, class_ast, 1); } }

« previous php.cvs (#89307) next »