From 045b74c12c0c2edde44bd0a8a3898a4aad2a1052 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 21 Aug 2018 13:43:29 +0200 Subject: [PATCH] Drop dead code var_ast is always a ZEND_AST_ZVAL. --- Zend/zend_compile.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 7f6c1eea945..229d4bbdcf0 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -4249,17 +4249,8 @@ void zend_compile_global_var(zend_ast *ast) /* {{{ */ static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, uint32_t by_ref) /* {{{ */ { - znode var_node; zend_op *opline; - zend_string *var_name; - - if (var_ast->kind == ZEND_AST_ZVAL) { - var_name = zval_make_interned_string(zend_ast_get_zval(var_ast)); - zend_compile_expr(&var_node, var_ast); - } else { - zend_compile_expr(&var_node, var_ast); - var_name = zval_make_interned_string(&var_node.u.constant); - } + zend_string *var_name = zval_make_interned_string(zend_ast_get_zval(var_ast)); if (!CG(active_op_array)->static_variables) { if (CG(active_op_array)->scope) { @@ -4284,7 +4275,6 @@ static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, uint3 opline->op1_type = IS_CV; opline->op1.var = lookup_cv(CG(active_op_array), var_name); opline->extended_value = (uint32_t)((char*)value - (char*)CG(active_op_array)->static_variables->arData) | by_ref; - zend_string_release_ex(var_name, 0); } /* }}} */