Allow arbitrary const expressions in backed enums

Closes GH-7821
Closes GH-8190
Closes GH-8418
This commit is contained in:
Ilija Tovilo 2022-03-10 22:35:01 +01:00
parent 5a855ee8d6
commit ddc0b490f7
No known key found for this signature in database
GPG key ID: A4F5D403F118200A
23 changed files with 287 additions and 144 deletions

View file

@ -848,14 +848,6 @@ static void zend_file_cache_serialize_class(zval *zv,
}
}
if (ce->backed_enum_table) {
HashTable *ht;
SERIALIZE_PTR(ce->backed_enum_table);
ht = ce->backed_enum_table;
UNSERIALIZE_PTR(ht);
zend_file_cache_serialize_hash(ht, script, info, buf, zend_file_cache_serialize_zval);
}
SERIALIZE_PTR(ce->constructor);
SERIALIZE_PTR(ce->destructor);
SERIALIZE_PTR(ce->clone);
@ -1645,12 +1637,6 @@ static void zend_file_cache_unserialize_class(zval *zv,
}
}
if (ce->backed_enum_table) {
UNSERIALIZE_PTR(ce->backed_enum_table);
zend_file_cache_unserialize_hash(
ce->backed_enum_table, script, buf, zend_file_cache_unserialize_zval, ZVAL_PTR_DTOR);
}
UNSERIALIZE_PTR(ce->constructor);
UNSERIALIZE_PTR(ce->destructor);
UNSERIALIZE_PTR(ce->clone);