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

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: 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/bin/gen_snapshot.cc ('k') | runtime/bin/run_vm_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 00bedca5ccc33ee15a2cecacb801e6a10d000e0f..e5e60dc1e23498a86bf21d39ccd28c58faa2d928 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -99,7 +99,8 @@ static const bool is_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";
@@ -1572,15 +1573,21 @@ void main(int argc, char** argv) {
EventHandler::Start();
const uint8_t* instructions_snapshot = NULL;
+ const uint8_t* data_snapshot = NULL;
if (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));
ReadSnapshotFile(precompiled_snapshot_directory,
kPrecompiledVmIsolateName,
&vm_isolate_snapshot_buffer);
ReadSnapshotFile(precompiled_snapshot_directory,
kPrecompiledIsolateName,
&isolate_snapshot_buffer);
+
} else if (run_full_snapshot) {
char* vm_snapshot_fname;
char* isolate_snapshot_fname;
@@ -1598,7 +1605,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698