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

Unified Diff: runtime/vm/isolate.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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 379287a67b4f94a77a36c0263c45cb0529b70d12..ed654ee467bdd22846484189225af3536fe2deb0 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -880,6 +880,24 @@ uword Isolate::GetCurrentStackPointer() {
}
+void Isolate::SetupInstructionsSnapshotPage(
+ const uint8_t* instructions_snapshot) {
+ // First word is the size of the snapshot, including the header.
+ uword header_size = OS::kMaxPreferredCodeAlignment;
+ uword snapshot_size = static_cast<uword>(
+ *reinterpret_cast<const uword*>(instructions_snapshot));
+ uword instructions_size = snapshot_size - header_size;
+ void* instructions_start = reinterpret_cast<void*>(
+ reinterpret_cast<uword>(instructions_snapshot) + header_size);
siva 2015/09/15 23:22:01 As discussed offline it might be more readable to
+#if defined(DEBUG)
+ OS::Print("Precompiled instructions are at [%" Px ", %" Px ")\n",
+ reinterpret_cast<uword>(instructions_start),
+ reinterpret_cast<uword>(instructions_start) + instructions_size);
+#endif
+ heap_->SetupInstructionsSnapshotPage(instructions_start, instructions_size);
+}
+
+
void Isolate::set_debugger_name(const char* name) {
free(debugger_name_);
debugger_name_ = strdup(name);
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/megamorphic_cache_table.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698