Skip to content

Commit 045b74c

Browse files
committed
Drop dead code
var_ast is always a ZEND_AST_ZVAL.
1 parent 168376e commit 045b74c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Zend/zend_compile.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4249,17 +4249,8 @@ void zend_compile_global_var(zend_ast *ast) /* {{{ */
42494249

42504250
static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, uint32_t by_ref) /* {{{ */
42514251
{
4252-
znode var_node;
42534252
zend_op *opline;
4254-
zend_string *var_name;
4255-
4256-
if (var_ast->kind == ZEND_AST_ZVAL) {
4257-
var_name = zval_make_interned_string(zend_ast_get_zval(var_ast));
4258-
zend_compile_expr(&var_node, var_ast);
4259-
} else {
4260-
zend_compile_expr(&var_node, var_ast);
4261-
var_name = zval_make_interned_string(&var_node.u.constant);
4262-
}
4253+
zend_string *var_name = zval_make_interned_string(zend_ast_get_zval(var_ast));
42634254

42644255
if (!CG(active_op_array)->static_variables) {
42654256
if (CG(active_op_array)->scope) {
@@ -4284,7 +4275,6 @@ static void zend_compile_static_var_common(zend_ast *var_ast, zval *value, uint3
42844275
opline->op1_type = IS_CV;
42854276
opline->op1.var = lookup_cv(CG(active_op_array), var_name);
42864277
opline->extended_value = (uint32_t)((char*)value - (char*)CG(active_op_array)->static_variables->arData) | by_ref;
4287-
zend_string_release_ex(var_name, 0);
42884278
}
42894279
/* }}} */
42904280

0 commit comments

Comments
 (0)