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

Unified Diff: runtime/bin/main.cc

Issue 1567953002: Precompilation: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
« no previous file with comments | « no previous file | runtime/vm/precompiler.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 71a6b65134221675451fa1e8ff85f89e8f8791ca..1c72db6632c1ae67b8a5e4ac5158f6e55186e67a 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -604,7 +604,24 @@ static int ParseArguments(int argc,
if ((commandline_package_root != NULL) &&
(commandline_packages_file != NULL)) {
Log::PrintErr("Specifying both a packages directory and a packages "
- "file is invalid.");
+ "file is invalid.\n");
+ return -1;
+ }
+ if (has_noopt) {
+ if (has_gen_precompiled_snapshot) {
+ Log::PrintErr("Specifying --noopt and --gen_precompiled_snapshot"
+ " is invalid.\n");
+ return -1;
+ }
+ if (has_run_precompiled_snapshot) {
+ Log::PrintErr("Specifying --noopt and --run_precompiled_snapshot"
+ " is invalid.\n");
+ return -1;
+ }
+ }
+ if (has_gen_precompiled_snapshot && has_run_precompiled_snapshot) {
+ Log::PrintErr("Specifying --gen_precompiled_snapshot and"
+ " --run_precompiled_snapshot is invalid.\n");
return -1;
}
@@ -1207,6 +1224,11 @@ bool RunMainIsolate(const char* script_name,
}
}
+ if (has_compile_all) {
+ result = Dart_CompileAll();
+ CHECK_RESULT(result);
+ }
+
if (has_noopt || has_gen_precompiled_snapshot) {
Dart_QualifiedFunctionName standalone_entry_points[] = {
{ "dart:_builtin", "::", "_getMainClosure" },
@@ -1267,11 +1289,6 @@ bool RunMainIsolate(const char* script_name,
instructions_buffer,
instructions_size);
} else {
- if (has_compile_all) {
- result = Dart_CompileAll();
- CHECK_RESULT(result);
- }
-
if (Dart_IsNull(root_lib)) {
ErrorExit(kErrorExitCode,
"Unable to find root library for '%s'\n",
« no previous file with comments | « no previous file | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698