decrement_function(var_ptr);
ZVAL_COPY(ret, var_ptr);
}
+
+#define HT_POISONED_PTR ((HashTable *) (intptr_t) -1)
+
+static zend_never_inline void ZEND_FASTCALL _zend_hash_iterators_remove(HashTable *ht)
+{
+ HashTableIterator *iter = EG(ht_iterators);
+ HashTableIterator *end = iter + EG(ht_iterators_used);
+
+ while (iter != end) {
+ if (iter->ht == ht) {
+ iter->ht = HT_POISONED_PTR;
+ }
+ iter++;
+ }
+}
+
+static void ZEND_FASTCALL zend_jit_array_free(HashTable *ht)
+{
+ GC_REMOVE_FROM_BUFFER(ht);
+ if (UNEXPECTED(HT_HAS_ITERATORS(ht))) {
+ _zend_hash_iterators_remove(ht);
+ }
+ if (!(EXPECTED(HT_FLAGS(ht) & HASH_FLAG_UNINITIALIZED))) {
+ efree(HT_GET_DATA_ADDR(ht));
+ }
+ FREE_HASHTABLE(ht);
+}
| EXT_CALL _efree, r0
|| break;
|| } else if (type == IS_ARRAY) {
-|| if (opline) {
-| SAVE_VALID_OPLINE opline, r0
+|| if ((var_info) & (MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_REF)) {
+|| if (opline && ((var_info) & (MAY_BE_ARRAY_OF_ARRAY|MAY_BE_ARRAY_OF_OBJECT|MAY_BE_ARRAY_OF_RESOURCE|MAY_BE_ARRAY_OF_REF))) {
+| SAVE_VALID_OPLINE opline, r0
+|| }
+| EXT_CALL zend_array_destroy, r0
+|| } else {
+| EXT_CALL zend_jit_array_free, r0|
|| }
-| EXT_CALL zend_array_destroy, r0
|| break;
|| } else if (type == IS_OBJECT) {
|| if (opline) {