[modular_aot] Serialization of UndefinedConstant in module snapshots

TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/61635
Change-Id: I94509fe61830174eecaec6ccfaeb13c6d20c4c27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/508707
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Alexander Markov
2026-06-03 11:32:19 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 4af16be8f0
commit 021068bb3d
2 changed files with 2 additions and 0 deletions
@@ -165,6 +165,7 @@ class SnapshotSerializer {
addBaseObject(const ast.NullType());
addBaseObject(const ast.NeverType.nonNullable());
addBaseObject(ast.ListConstant(const ast.DynamicType(), const []));
addBaseObject(UndefinedConstant());
// TODO: generate these stubs instead of referencing them from the VM.
addBaseObject(StubCode.Subtype1TestCache);
addBaseObject(StubCode.Subtype2TestCache);
+1
View File
@@ -1642,6 +1642,7 @@ void Deserializer::Deserialize() {
AddBaseObject(Type::Handle(zone(), object_store->null_type()));
AddBaseObject(Type::Handle(zone(), object_store->never_type()));
AddBaseObject(Object::empty_array());
AddBaseObject(Object::optimized_out());
AddBaseObject(StubCode::Subtype1TestCache());
AddBaseObject(StubCode::Subtype2TestCache());
AddBaseObject(StubCode::Subtype3TestCache());