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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1698323003: Don't include ICData::owner_ in precompiled snapshots. (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
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index cfa19c47beed844fcba28efd133cf85644cbe87a..a72511907abca8d6effaa44b35ff890a6ad7e284 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1997,8 +1997,11 @@ RawICData* ICData::ReadFrom(SnapshotReader* reader,
result.set_state_bits(reader->Read<uint32_t>());
// Set all the object fields.
+ RawObject** toobj = reader->snapshot_code()
+ ? result.raw()->to_precompiled_snapshot()
+ : result.raw()->to();
READ_OBJECT_FIELDS(result,
- result.raw()->from(), result.raw()->to(),
+ result.raw()->from(), toobj,
kAsReference);
return result.raw();
@@ -2023,8 +2026,12 @@ void RawICData::WriteTo(SnapshotWriter* writer,
writer->Write<uint32_t>(ptr()->state_bits_);
// Write out all the object pointer fields.
+ // In precompiled snapshots, omit the owner field. The owner field may
+ // refer to a function which was always inlined and no longer need.
srdjan 2016/02/16 20:36:42 s/need/needed/
rmacnak 2016/02/16 21:39:17 Done.
SnapshotWriterVisitor visitor(writer, kAsReference);
- visitor.VisitPointers(from(), to());
+ RawObject** toobj = writer->snapshot_code() ? to_precompiled_snapshot()
+ : to();
+ visitor.VisitPointers(from(), toobj);
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698