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

Unified Diff: runtime/vm/dart.cc

Issue 1336763002: Last snapshot bits to get working precompiled hello_world on x64. (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 | « runtime/vm/dart.h ('k') | runtime/vm/heap.h » ('j') | runtime/vm/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 89d9fc5527c0cf1e9e83a4392b35852e12ca1580..9922b879e8a9ca6ce7e804217846549b9afa5ad8 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -44,6 +44,7 @@ Isolate* Dart::vm_isolate_ = NULL;
ThreadPool* Dart::thread_pool_ = NULL;
DebugInfo* Dart::pprof_symbol_generator_ = NULL;
ReadOnlyHandles* Dart::predefined_handles_ = NULL;
+const uint8_t* Dart::instructions_snapshot_buffer_ = NULL;
// Structure for managing read-only global handles allocation used for
// creating global read-only handles that are pre created and initialized
@@ -144,6 +145,9 @@ const char* Dart::InitOnce(const uint8_t* vm_isolate_snapshot,
StubCode::InitOnce();
}
if (vm_isolate_snapshot != NULL) {
+ if (instructions_snapshot != NULL) {
+ vm_isolate_->SetupInstructionsSnapshotPage(instructions_snapshot);
+ }
const Snapshot* snapshot = Snapshot::SetupFromBuffer(vm_isolate_snapshot);
if (snapshot == NULL) {
return "Invalid vm isolate snapshot seen.";
@@ -314,7 +318,7 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
}
IsolateSnapshotReader reader(snapshot->content(),
snapshot->length(),
- Object::instructions_snapshot_buffer(),
+ Dart::instructions_snapshot_buffer(),
T);
const Error& error = Error::Handle(reader.ReadFullSnapshot());
if (!error.IsNull()) {
@@ -333,13 +337,20 @@ RawError* Dart::InitializeIsolate(const uint8_t* snapshot_buffer, void* data) {
}
Object::VerifyBuiltinVtables();
+#if defined(DEBUG)
+ I->heap()->Verify(kForbidMarked);
+#endif
{
TimelineDurationScope tds(I, I->GetIsolateStream(), "StubCode::Init");
StubCode::Init(I);
}
- MegamorphicCacheTable::InitMissHandler(I);
+ // When running precompiled, the megamorphic miss function/code come from the
siva 2015/09/16 16:45:41 function/code comes from
rmacnak 2015/09/16 18:17:18 Done.
+ // snapshot.
+ if (!Dart::IsRunningPrecompiledCode()) {
+ MegamorphicCacheTable::InitMissHandler(I);
+ }
if (snapshot_buffer == NULL) {
if (!I->object_store()->PreallocateObjects()) {
return I->object_store()->sticky_error();
« no previous file with comments | « runtime/vm/dart.h ('k') | runtime/vm/heap.h » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698