Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Unified Diff: runtime/vm/clustered_snapshot.cc

Issue 2359543003: Make sure unresolved function type parameter bounds do not end up in snapshot. (Closed)
Patch Set: address Siva/s comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/clustered_snapshot.cc
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index c2f3fc0633e3df53b3f55ea574f5eb25e69e886e..629f3b01b4444b065d47f64490ac3e256b78078b 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -2723,6 +2723,11 @@ class TypeSerializationCluster : public SerializationCluster {
s->Push(*p);
}
+ if (type->ptr()->type_class_id_->IsHeapObject()) {
+ // Type class is still an unresolved class.
+ UNREACHABLE();
+ }
+
RawSmi* raw_type_class_id = Smi::RawCast(type->ptr()->type_class_id_);
RawClass* type_class =
s->isolate()->class_table()->At(Smi::Value(raw_type_class_id));
@@ -2954,6 +2959,7 @@ class TypeParameterSerializationCluster : public SerializationCluster {
s->Write<int32_t>(type->ptr()->parameterized_class_id_);
s->WriteTokenPosition(type->ptr()->token_pos_);
s->Write<int16_t>(type->ptr()->index_);
+ s->Write<uint8_t>(type->ptr()->parent_level_);
s->Write<int8_t>(type->ptr()->type_state_);
}
}
@@ -2996,6 +3002,7 @@ class TypeParameterDeserializationCluster : public DeserializationCluster {
type->ptr()->parameterized_class_id_ = d->Read<int32_t>();
type->ptr()->token_pos_ = d->ReadTokenPosition();
type->ptr()->index_ = d->Read<int16_t>();
+ type->ptr()->parent_level_ = d->Read<uint8_t>();
type->ptr()->type_state_ = d->Read<int8_t>();
}
}
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698