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

Unified Diff: runtime/vm/isolate.cc

Issue 1584443002: VM: Precompiled rodata snapshot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: win32, android build Created 4 years, 11 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 5c764df99fef660f2e0a21bf014d6906716efc79..99ec4b2a3f2d51f6d1cbfa2c57145d2739e5cd17 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -974,10 +974,28 @@ void Isolate::SetupInstructionsSnapshotPage(
}
#endif
heap_->SetupInstructionsSnapshotPage(snapshot.instructions_start(),
- snapshot.instructions_size());
+ snapshot.instructions_size(),
+ /* is_executable = */ true);
}
+void Isolate::SetupDataSnapshotPage(const uint8_t* data_snapshot_buffer) {
+ DataSnapshot snapshot(data_snapshot_buffer);
+#if defined(DEBUG)
+ if (FLAG_trace_isolates) {
+ OS::Print("Precompiled rodata are at [0x%" Px ", 0x%" Px ")\n",
+ reinterpret_cast<uword>(snapshot.data_start()),
+ reinterpret_cast<uword>(snapshot.data_start()) +
+ snapshot.data_size());
+ }
+#endif
+ heap_->SetupInstructionsSnapshotPage(snapshot.data_start(),
+ snapshot.data_size(),
+ /* is_executable = */ false);
+}
+
+
+
void Isolate::set_debugger_name(const char* name) {
free(debugger_name_);
debugger_name_ = strdup(name);

Powered by Google App Engine
This is Rietveld 408576698