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

Unified Diff: runtime/bin/main.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/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 5e57327cc1e86615b5ee397d4445a183419c1877..5fb21472db9ef7bfa11e6bfb0b4d137be0a5a83c 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -84,7 +84,8 @@ static bool has_noopt = false;
extern const char* kPrecompiledLibraryName;
-extern const char* kPrecompiledSymbolName;
+extern const char* kPrecompiledInstructionsSymbolName;
+extern const char* kPrecompiledDataSymbolName;
static const char* kPrecompiledVmIsolateName = "precompiled.vmisolate";
static const char* kPrecompiledIsolateName = "precompiled.isolate";
static const char* kPrecompiledInstructionsName = "precompiled.S";
@@ -1461,9 +1462,13 @@ void main(int argc, char** argv) {
EventHandler::Start();
const uint8_t* instructions_snapshot = NULL;
+ const uint8_t* data_snapshot = NULL;
if (has_run_precompiled_snapshot) {
instructions_snapshot = reinterpret_cast<const uint8_t*>(
- LoadLibrarySymbol(kPrecompiledLibraryName, kPrecompiledSymbolName));
+ LoadLibrarySymbol(kPrecompiledLibraryName,
+ kPrecompiledInstructionsSymbolName));
+ data_snapshot = reinterpret_cast<const uint8_t*>(
+ LoadLibrarySymbol(kPrecompiledLibraryName, kPrecompiledDataSymbolName));
ReadPrecompiledSnapshotFile(kPrecompiledVmIsolateName,
&vm_isolate_snapshot_buffer);
ReadPrecompiledSnapshotFile(kPrecompiledIsolateName,
@@ -1472,7 +1477,7 @@ void main(int argc, char** argv) {
// Initialize the Dart VM.
char* error = Dart_Initialize(
- vm_isolate_snapshot_buffer, instructions_snapshot,
+ vm_isolate_snapshot_buffer, instructions_snapshot, data_snapshot,
CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate,
DartUtils::OpenFile,
DartUtils::ReadFile,
« no previous file with comments | « runtime/bin/gen_snapshot.cc ('k') | runtime/bin/run_vm_tests.cc » ('j') | runtime/vm/heap.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698