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

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: compute string hash if necessary Created 4 years, 10 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/isolate.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 7d317d91b015a4c640bb646060a519c92051c1e1..32b50e86084612a75e4ec366b283bc6a694b6384 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1013,11 +1013,29 @@ void Isolate::SetupInstructionsSnapshotPage(
snapshot.instructions_size());
}
#endif
- heap_->SetupInstructionsSnapshotPage(snapshot.instructions_start(),
- snapshot.instructions_size());
+ 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)
+ 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_->SetupExternalPage(snapshot.data_start(),
+ snapshot.data_size(),
+ /* is_executable = */ false);
+}
+
+
+
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/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698