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)
169169 }
170170}
171171
172+ static void zend_persist_op_array (zval * zv );
173+
172174static zend_ast * zend_persist_ast (zend_ast * ast )
173175{
174176 uint32_t i ;
175177 zend_ast * node ;
176178
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 ) {
178184 zend_ast_zval * copy = zend_shared_memdup (ast , sizeof (zend_ast_zval ));
179185 zend_persist_zval (& copy -> val );
180186 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)
7171 }
7272}
7373
74+ static void zend_persist_op_array_calc (zval * zv );
75+
7476static void zend_persist_ast_calc (zend_ast * ast )
7577{
7678 uint32_t i ;
7779
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 ) {
7984 ADD_SIZE (sizeof (zend_ast_zval ));
8085 zend_persist_zval_calc (& ((zend_ast_zval * )(ast ))-> val );
8186 } else if (zend_ast_is_list (ast )) {
You can’t perform that action at this time.
0 commit comments