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

Unified Diff: runtime/vm/isolate.cc

Issue 1938653002: JIT precompilated snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 dc526137503c89b8cd53cc21858ac3ba12e17714..44127c5e18fe59a750dab6d1d8a033c2e39e1f81 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -934,6 +934,23 @@ Isolate* Isolate::Init(const char* name_prefix,
}
+void Isolate::SetupInstructionsSnapshotPage(
+ const uint8_t* instructions_snapshot_buffer) {
+ InstructionsSnapshot snapshot(instructions_snapshot_buffer);
+#if defined(DEBUG)
+ if (FLAG_trace_isolates) {
+ OS::Print("Precompiled instructions are at [0x%" Px ", 0x%" Px ")\n",
+ reinterpret_cast<uword>(snapshot.instructions_start()),
+ reinterpret_cast<uword>(snapshot.instructions_start()) +
+ snapshot.instructions_size());
+ }
+#endif
+ heap_->SetupExternalPage(snapshot.instructions_start(),
+ snapshot.instructions_size(),
+ /* is_executable = */ true);
+}
+
+
void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) {
DataSnapshot snapshot(data_snapshot_buffer);
#if defined(DEBUG)

Powered by Google App Engine
This is Rietveld 408576698