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

Unified Diff: runtime/vm/snapshot.cc

Issue 1311403009: More precompiled snapshotting. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync 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 | « runtime/vm/snapshot.h ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 3612f1c0c4f1184b39929a069aeace1930e16940..9085be9ab66418ea218a4ff14ce2b833cbd66332 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -198,6 +198,8 @@ SnapshotReader::SnapshotReader(
data_(ExternalTypedData::Handle(zone_)),
typed_data_(TypedData::Handle(zone_)),
code_(Code::Handle(zone_)),
+ function_(Function::Handle(zone_)),
+ megamorphic_cache_(MegamorphicCache::Handle(zone_)),
error_(UnhandledException::Handle(zone_)),
max_vm_isolate_object_id_(
(kind == Snapshot::kFull) ?
@@ -1542,12 +1544,7 @@ RawApiError* VmIsolateSnapshotReader::ReadVmIsolateSnapshot() {
LocalVarDescriptors::CheckedHandle(ReadObject()); // empty var desc
ExceptionHandlers::CheckedHandle(ReadObject()); // empty exc handlers
-#define READ_STUB(name) \
- *(CodeHandle()) ^= ReadObject();
- // TODO(rmacnak):
- // StubCode::name##_entry()->InitOnceFromSnapshot(CodeHandle())
- VM_STUB_CODE_LIST(READ_STUB);
-#undef READ_STUB
+ StubCode::ReadFrom(this);
}
// Validate the class table.
@@ -1571,6 +1568,7 @@ IsolateSnapshotReader::IsolateSnapshotReader(const uint8_t* buffer,
new ZoneGrowableArray<BackRefNode>(
kNumInitialReferencesInFullSnapshot),
thread) {
+ Isolate::Current()->set_compilation_allowed(instructions_buffer_ == NULL);
siva 2015/09/15 23:21:02 isolate()->set_compilation_allowed(...);
rmacnak 2015/09/15 23:53:21 Done.
}
@@ -1951,10 +1949,7 @@ void FullSnapshotWriter::WriteVmIsolateSnapshot() {
writer.WriteObject(Object::empty_var_descriptors().raw());
writer.WriteObject(Object::empty_exception_handlers().raw());
-#define WRITE_STUB(name) \
- writer.WriteObject(StubCode::name##_entry()->code());
- VM_STUB_CODE_LIST(WRITE_STUB);
-#undef WRITE_STUB
+ StubCode::WriteTo(&writer);
}
« no previous file with comments | « runtime/vm/snapshot.h ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698