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

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: 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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 0c992e107299e90b5e28aabe6b28ebb5fd0192bd..943e3cc29574e55c5378c4dd0cc7b27d10cd72ad 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 uint64_t is the size of the snapshot, including the header.
+ uword header_size = OS::kMaxPreferredCodeAlignment;
+ uword snapshot_size = static_cast<uword>(
+ *reinterpret_cast<const uint64_t*>(instructions_snapshot));
siva 2015/09/14 21:29:33 Would be better to do Snapshot* instr_snapshot =
+ uword instructions_size = snapshot_size - header_size;
+ void* instructions_start = reinterpret_cast<void*>(
+ reinterpret_cast<uword>(instructions_snapshot) + header_size);
+#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);

Powered by Google App Engine
This is Rietveld 408576698