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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1345053003: Write the contents of ICData and ObjectPools more eagerly and the contents of Code and Functions (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/snapshot.cc » ('j') | 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 7f20153165aa3813c048b3b8c3864aee102a9da2..748206546f14618ec71db035c632f700f807ca38 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -541,7 +541,9 @@ RawClosureData* ClosureData::ReadFrom(SnapshotReader* reader,
reader->AddBackRef(object_id, &data, kIsDeserialized);
// Set all the object fields.
- READ_OBJECT_FIELDS(data, data.raw()->from(), data.raw()->to(), kAsReference);
+ READ_OBJECT_FIELDS(data,
+ data.raw()->from(), data.raw()->to(),
+ kAsInlinedObject);
return data.raw();
}
@@ -597,7 +599,9 @@ RawRedirectionData* RedirectionData::ReadFrom(SnapshotReader* reader,
reader->AddBackRef(object_id, &data, kIsDeserialized);
// Set all the object fields.
- READ_OBJECT_FIELDS(data, data.raw()->from(), data.raw()->to(), kAsReference);
+ READ_OBJECT_FIELDS(data,
+ data.raw()->from(), data.raw()->to(),
+ kAsReference);
return data.raw();
}
@@ -654,7 +658,7 @@ RawFunction* Function::ReadFrom(SnapshotReader* reader,
func.raw()->to_snapshot());
READ_OBJECT_FIELDS(func,
func.raw()->from(), toobj,
- kAsInlinedObject);
+ kAsReference);
if (!reader->snapshot_code()) {
// Initialize all fields that are not part of the snapshot.
if (!is_optimized) {
@@ -726,7 +730,7 @@ void RawFunction::WriteTo(SnapshotWriter* writer,
RawObject** toobj =
writer->snapshot_code() ? to() :
(is_optimized ? to_optimized_snapshot() : to_snapshot());
- SnapshotWriterVisitor visitor(writer, kAsInlinedObject);
+ SnapshotWriterVisitor visitor(writer, kAsReference);
visitor.VisitPointers(from(), toobj);
} else {
writer->WriteFunctionId(this, owner_is_class);
@@ -1200,7 +1204,7 @@ RawCode* Code::ReadFrom(SnapshotReader* reader,
// Set all the object fields.
READ_OBJECT_FIELDS(result,
result.raw()->from(), result.raw()->to(),
- kAsInlinedObject);
+ kAsReference);
// Fix entry point.
uword new_entry = result.EntryPoint();
@@ -1237,7 +1241,7 @@ void RawCode::WriteTo(SnapshotWriter* writer,
writer->Write<int32_t>(ptr()->lazy_deopt_pc_offset_);
// Write out all the object pointer fields.
- SnapshotWriterVisitor visitor(writer, kAsInlinedObject);
+ SnapshotWriterVisitor visitor(writer, kAsReference);
visitor.VisitPointers(from(), to());
writer->SetInstructionsCode(ptr()->instructions_, this);
@@ -1309,7 +1313,8 @@ RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader,
*reinterpret_cast<int8_t*>(info_array.DataAddr(i)) = entry_type;
switch (entry_type) {
case ObjectPool::kTaggedObject: {
- (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(kAsReference);
+ (*reader->PassiveObjectHandle()) =
+ reader->ReadObjectImpl(kAsInlinedObject);
result.SetObjectAt(i, *(reader->PassiveObjectHandle()));
break;
}
@@ -1358,7 +1363,7 @@ void RawObjectPool::WriteTo(SnapshotWriter* writer,
Entry& entry = ptr()->data()[i];
switch (entry_type) {
case ObjectPool::kTaggedObject: {
- writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
+ writer->WriteObjectImpl(entry.raw_obj_, kAsInlinedObject);
break;
}
case ObjectPool::kImmediate: {
@@ -1706,7 +1711,7 @@ RawICData* ICData::ReadFrom(SnapshotReader* reader,
// Set all the object fields.
READ_OBJECT_FIELDS(result,
result.raw()->from(), result.raw()->to(),
- kAsReference);
+ kAsInlinedObject);
return result.raw();
}
@@ -1729,7 +1734,7 @@ void RawICData::WriteTo(SnapshotWriter* writer,
writer->Write<uint32_t>(ptr()->state_bits_);
// Write out all the object pointer fields.
- SnapshotWriterVisitor visitor(writer);
Florian Schneider 2015/09/23 12:23:39 I think it would be safer to get rid of the defaul
rmacnak 2015/09/23 18:12:04 Done.
+ SnapshotWriterVisitor visitor(writer, kAsInlinedObject);
visitor.VisitPointers(from(), to());
}
« no previous file with comments | « no previous file | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698