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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 335173002: Save ICData of unoptimized code in the function, thus preserving it across repated unoptimized comp… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 37375)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -705,14 +705,14 @@
// Set all the object fields.
// TODO(5411462): Need to assert No GC can happen here, even though
// allocations may happen.
- intptr_t num_flds = (func.raw()->to() - func.raw()->from());
+ intptr_t num_flds = (func.raw()->to_snapshot() - func.raw()->from());
for (intptr_t i = 0; i <= num_flds; i++) {
*(func.raw()->from() + i) = reader->ReadObjectRef();
}
- // Set up code pointer with the lazy-compile-stub.
- func.SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
-
+ // Initialize all fields that are not part of the snapshot.
+ func.ClearCode();
+ func.set_ic_data_array(Array::Handle());
return func.raw();
}
@@ -745,11 +745,7 @@
// Write out all the object pointer fields.
SnapshotWriterVisitor visitor(writer);
- visitor.VisitPointers(from(), to_no_code());
-
- // Write null for the instructions and unoptimized code.
- writer->WriteVMIsolateObject(kNullObject);
- writer->WriteVMIsolateObject(kNullObject);
+ visitor.VisitPointers(from(), to_snapshot());
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698