Index: runtime/bin/main.cc |
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc |
index f64e4a816622d211319d4224a36811b6ed709434..939bb4ce1992164bb80fe2fa827df0f52b6291b3 100644 |
--- a/runtime/bin/main.cc |
+++ b/runtime/bin/main.cc |
@@ -97,17 +97,6 @@ static bool parse_all = false; |
static bool use_blobs = false; |
-// Global flag that is used to indicate that we want to compile everything in |
-// the same way as precompilation before main, then continue running in the |
-// same process. |
-// Always set this with dart_noopt. |
-#if defined(DART_PRECOMPILER) && !defined(DART_NO_SNAPSHOT) |
-static const bool is_noopt = true; |
-#else |
-static const bool is_noopt = false; |
-#endif |
- |
- |
extern const char* kPrecompiledVMIsolateSymbolName; |
extern const char* kPrecompiledIsolateSymbolName; |
extern const char* kPrecompiledInstructionsSymbolName; |
@@ -730,10 +719,6 @@ static int ParseArguments(int argc, |
Log::PrintErr("Empty package file name specified.\n"); |
return -1; |
} |
- if (is_noopt && gen_snapshot_kind != kNone) { |
- Log::PrintErr("Generating a snapshot with dart_noopt is invalid.\n"); |
- return -1; |
- } |
if ((gen_snapshot_kind != kNone) && (snapshot_filename == NULL)) { |
Log::PrintErr("Generating a snapshot requires a filename (--snapshot).\n"); |
return -1; |
@@ -830,19 +815,6 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri, |
char** error, |
int* exit_code) { |
ASSERT(script_uri != NULL); |
- |
- const bool needs_load_port = true; |
-#if defined(PRODUCT) |
- const bool run_service_isolate = needs_load_port; |
-#else |
- // Always create the service isolate in DEBUG and RELEASE modes for profiling, |
- // even if we don't need it for loading. |
- const bool run_service_isolate = true; |
-#endif // PRODUCT |
- if (!run_service_isolate && |
- (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0)) { |
- return NULL; |
- } |
if (strcmp(script_uri, DART_KERNEL_ISOLATE_NAME) == 0) { |
if (!use_dart_frontend) { |
*error = strdup("Kernel isolate not supported."); |
@@ -925,12 +897,10 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri, |
result = DartUtils::PrepareForScriptLoading(false, trace_loading); |
CHECK_RESULT(result); |
- if (needs_load_port) { |
- // Set up the load port provided by the service isolate so that we can |
- // load scripts. |
- result = DartUtils::SetupServiceLoadPort(); |
- CHECK_RESULT(result); |
- } |
+ // Set up the load port provided by the service isolate so that we can |
+ // load scripts. |
+ result = DartUtils::SetupServiceLoadPort(); |
+ CHECK_RESULT(result); |
if (Dart_IsKernelIsolate(isolate)) { |
script_uri = frontend_filename; |
@@ -1659,8 +1629,7 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) { |
reinterpret_cast<IsolateData*>(Dart_IsolateData(isolate)); |
result = Dart_LibraryImportLibrary(isolate_data->builtin_lib(), root_lib, |
Dart_Null()); |
- if (is_noopt || (gen_snapshot_kind == kAppAOT) || |
- (gen_snapshot_kind == kAppJIT)) { |
+ if ((gen_snapshot_kind == kAppAOT) || (gen_snapshot_kind == kAppJIT)) { |
// Load the embedder's portion of the VM service's Dart code so it will |
// be included in the app snapshot. |
if (!VmService::LoadForGenPrecompiled()) { |
@@ -1684,7 +1653,7 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) { |
return false; |
} |
- if (is_noopt || (gen_snapshot_kind == kAppAOT)) { |
+ if (gen_snapshot_kind == kAppAOT) { |
Dart_QualifiedFunctionName standalone_entry_points[] = { |
{"dart:_builtin", "::", "_getMainClosure"}, |
{"dart:_builtin", "::", "_getPrintClosure"}, |
@@ -1737,9 +1706,8 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) { |
file->Release(); |
} |
- const bool reset_fields = gen_snapshot_kind == kAppAOT; |
- result = Dart_Precompile(standalone_entry_points, reset_fields, |
- feedback_buffer, feedback_length); |
+ result = Dart_Precompile(standalone_entry_points, feedback_buffer, |
+ feedback_length); |
if (feedback_buffer != NULL) { |
free(feedback_buffer); |
} |
@@ -1967,7 +1935,7 @@ void main(int argc, char** argv) { |
vm_options.AddArgument("--collect_code=false"); |
#endif |
} |
- if ((gen_snapshot_kind == kAppAOT) || is_noopt) { |
+ if (gen_snapshot_kind == kAppAOT) { |
vm_options.AddArgument("--precompilation"); |
} |
#if defined(DART_PRECOMPILED_RUNTIME) |