summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2017-10-09 16:57:51 +0300
committerDmitry Stogov <dmitry@zend.com>2017-10-09 16:57:51 +0300
commit39ded1d5f85ca3358cc8a52bb37e72a5eb5ce0db (patch)
treea3c1e3905f8a97c3ca0c34d2c944d2b8b8ae37c6 /Zend/zend_variables.c
parent65f610bd9fdad785aa7fbbc1a325acd329b3240e (diff)
downloadphp-git-39ded1d5f85ca3358cc8a52bb37e72a5eb5ce0db.tar.gz
Changed zend_ast_ref structure to use only one allocation, removing dichotomy between heap/arena ASTs.
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 6c1e235eb6..09338013b8 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -46,8 +46,8 @@ ZEND_API void ZEND_FASTCALL _zval_dtor_func(zend_refcounted *p ZEND_FILE_LINE_DC
case IS_CONSTANT_AST: {
zend_ast_ref *ast = (zend_ast_ref*)p;
- zend_ast_destroy_and_free(ast->ast);
- efree_size(ast, sizeof(zend_ast_ref));
+ zend_ast_destroy(GC_AST(ast));
+ efree(ast);
break;
}
case IS_OBJECT: {
@@ -174,8 +174,7 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
- zend_ast *copy = zend_ast_copy(Z_ASTVAL_P(zvalue));
- ZVAL_NEW_AST(zvalue, copy);
+ ZVAL_AST(zvalue, zend_ast_copy(Z_ASTVAL_P(zvalue)));
}
}