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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 203523011: Introduce a lazy-compile stub for functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased Created 6 years, 9 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.cc ('k') | runtime/vm/runtime_entry_test.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
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 34642)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -6,6 +6,7 @@
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/snapshot.h"
+#include "vm/stub_code.h"
#include "vm/symbols.h"
#include "vm/visitor.h"
@@ -709,6 +710,9 @@
*(func.raw()->from() + i) = reader->ReadObjectRef();
}
+ // Set up code pointer with the lazy-compile-stub.
+ func.set_code(Code::Handle(StubCode::LazyCompile_entry()->code()));
+
return func.raw();
}
@@ -741,7 +745,11 @@
// Write out all the object pointer fields.
SnapshotWriterVisitor visitor(writer);
- visitor.VisitPointers(from(), to());
+ visitor.VisitPointers(from(), to_no_code());
+
+ // Write null for the code and unoptimized code.
+ writer->WriteVMIsolateObject(kNullObject);
+ writer->WriteVMIsolateObject(kNullObject);
}
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/runtime_entry_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698