Index: runtime/bin/main.cc |
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc |
index 71e338cc302592c2dcdf875f014fb5b40ac24a02..a430f8d1f5185e299cf76eb85f6ab822e6397667 100644 |
--- a/runtime/bin/main.cc |
+++ b/runtime/bin/main.cc |
@@ -822,7 +822,6 @@ static void SnapshotOnExitHook(int64_t exit_code) { |
static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate, |
bool is_main_isolate, |
- bool kernel_file_specified, |
const char* script_uri, |
const char* package_root, |
const char* packages_config, |
@@ -845,7 +844,8 @@ static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate, |
result = DartUtils::PrepareForScriptLoading(false, trace_loading); |
CHECK_RESULT(result); |
- if (kernel_file_specified) { |
+#if !defined(DART_PRECOMPILED_RUNTIME) |
+ if (dfe.kernel_file_specified()) { |
ASSERT(kernel_program != NULL); |
result = Dart_LoadKernel(kernel_program); |
} else { |
@@ -860,6 +860,8 @@ static Dart_Isolate IsolateSetupHelper(Dart_Isolate isolate, |
CHECK_RESULT(result); |
} |
} |
+#endif // !defined(DART_PRECOMPILED_RUNTIME) |
+ |
if (set_native_resolvers) { |
// Setup the native resolver as the snapshot does not carry it. |
Builtin::SetNativeResolver(Builtin::kBuiltinLibrary); |
@@ -982,7 +984,7 @@ static Dart_Isolate CreateAndSetupKernelIsolate(const char* main, |
return NULL; |
} |
- return IsolateSetupHelper(isolate, false, false, script_uri, package_root, |
+ return IsolateSetupHelper(isolate, false, script_uri, package_root, |
packages_config, isolate_snapshot_data, |
isolate_run_app_snapshot, error, exit_code); |
} |
@@ -1080,7 +1082,6 @@ static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate, |
void* kernel_platform = NULL; |
void* kernel_program = NULL; |
AppSnapshot* app_snapshot = NULL; |
- bool kernel_file_specified = false; |
IsolateData* isolate_data = |
new IsolateData(script_uri, package_root, packages_config, app_snapshot); |
@@ -1124,7 +1125,7 @@ static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate, |
if (kernel_program != NULL) { |
// A kernel file was specified on the command line instead of a source |
// file. Load that kernel file directly. |
- kernel_file_specified = true; |
+ dfe.set_kernel_file_specified(true); |
} else if (dfe.UseDartFrontend()) { |
kernel_program = dfe.CompileAndReadScript(script_uri, error, exit_code); |
if (kernel_program == NULL) { |
@@ -1153,10 +1154,9 @@ static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate, |
} |
bool set_native_resolvers = (kernel_program || isolate_snapshot_data); |
- return IsolateSetupHelper(isolate, is_main_isolate, kernel_file_specified, |
- script_uri, package_root, packages_config, |
- set_native_resolvers, isolate_run_app_snapshot, |
- error, exit_code); |
+ return IsolateSetupHelper(isolate, is_main_isolate, script_uri, package_root, |
+ packages_config, set_native_resolvers, |
+ isolate_run_app_snapshot, error, exit_code); |
} |
#undef CHECK_RESULT |