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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1686773002: Precompilation: drop unused types and type arguments and empty classes and libraries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 405c2e4fe1b1a5a24320edc4d8a1a23de367f216..8f8e5428ee7dcb67a5f27452d06bd85fa48561a4 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -115,6 +115,7 @@ void RawClass::WriteTo(SnapshotWriter* writer,
// Write out all the non object pointer fields.
// NOTE: cpp_vtable_ is not written.
classid_t class_id = ptr()->id_;
+ ASSERT(class_id != kIllegalCid);
writer->Write<classid_t>(class_id);
if (!RawObject::IsInternalVMdefinedClassId(class_id)) {
// We don't write the instance size of VM defined classes as they
@@ -1290,6 +1291,7 @@ void RawLibrary::WriteTo(SnapshotWriter* writer,
} else {
ASSERT((kind == Snapshot::kFull) || !ptr()->is_in_fullsnapshot_);
// Write out all non object fields.
+ // TODO(rmacnak): ASSERT(ptr()->index_ != static_cast<classid_t>(-1));
regis 2016/02/19 20:54:07 Is this ASSERT not yet valid?
rmacnak 2016/02/20 01:35:39 I put it back in locally but forgot to reupload th
writer->WriteClassIDValue(ptr()->index_);
writer->Write<uint16_t>(ptr()->num_imports_);
writer->Write<int8_t>(ptr()->load_state_);
@@ -2003,6 +2005,9 @@ RawICData* ICData::ReadFrom(SnapshotReader* reader,
READ_OBJECT_FIELDS(result,
result.raw()->from(), toobj,
kAsReference);
+ if (reader->snapshot_code()) {
+ result.set_owner(Function::Handle(reader->zone()));
+ }
return result.raw();
}
« runtime/vm/precompiler.cc ('K') | « runtime/vm/raw_object.h ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698