File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -169,12 +169,18 @@ static void zend_hash_persist(HashTable *ht)
169
169
}
170
170
}
171
171
172
+ static void zend_persist_op_array (zval * zv );
173
+
172
174
static zend_ast * zend_persist_ast (zend_ast * ast )
173
175
{
174
176
uint32_t i ;
175
177
zend_ast * node ;
176
178
177
- if (ast -> kind == ZEND_AST_ZVAL || ast -> kind == ZEND_AST_CONSTANT ) {
179
+ if (ast -> kind == ZEND_AST_CLOSURE_CONSTEXPR ) {
180
+ uint32_t children = zend_ast_get_num_children (ast );
181
+ node = zend_shared_memdup (ast , zend_ast_size (children ));
182
+ zend_persist_op_array (zend_ast_get_zval (node -> child [0 ]));
183
+ } else if (ast -> kind == ZEND_AST_ZVAL || ast -> kind == ZEND_AST_CONSTANT ) {
178
184
zend_ast_zval * copy = zend_shared_memdup (ast , sizeof (zend_ast_zval ));
179
185
zend_persist_zval (& copy -> val );
180
186
node = (zend_ast * ) copy ;
Original file line number Diff line number Diff line change @@ -71,11 +71,16 @@ static void zend_hash_persist_calc(HashTable *ht)
71
71
}
72
72
}
73
73
74
+ static void zend_persist_op_array_calc (zval * zv );
75
+
74
76
static void zend_persist_ast_calc (zend_ast * ast )
75
77
{
76
78
uint32_t i ;
77
79
78
- if (ast -> kind == ZEND_AST_ZVAL || ast -> kind == ZEND_AST_CONSTANT ) {
80
+ if (ast -> kind == ZEND_AST_CLOSURE_CONSTEXPR ) {
81
+ ADD_SIZE (sizeof (zend_ast_zval ));
82
+ zend_persist_op_array_calc (zend_ast_get_zval (ast -> child [0 ]));
83
+ } else if (ast -> kind == ZEND_AST_ZVAL || ast -> kind == ZEND_AST_CONSTANT ) {
79
84
ADD_SIZE (sizeof (zend_ast_zval ));
80
85
zend_persist_zval_calc (& ((zend_ast_zval * )(ast ))-> val );
81
86
} else if (zend_ast_is_list (ast )) {
You can’t perform that action at this time.
0 commit comments