Chromium Code Reviews| Index: runtime/bin/main.cc |
| diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc |
| index 9f7123843e824452a4c3793fac63b43d830f3b50..8e4082f837689d914e1aaced33982a85be582ddb 100644 |
| --- a/runtime/bin/main.cc |
| +++ b/runtime/bin/main.cc |
| @@ -78,6 +78,7 @@ static const char* commandline_packages_file = NULL; |
| // Global flag that is used to indicate that we want to compile all the |
| // dart functions and not run anything. |
| static bool compile_all = false; |
| +static bool parse_all = false; |
| // Global flag that is used to indicate that we want to use blobs/mmap instead |
| @@ -324,6 +325,17 @@ static bool ProcessCompileAllOption(const char* arg, |
| } |
| +static bool ProcessParseAllOption(const char* arg, |
| + CommandLineOptions* vm_options) { |
| + ASSERT(arg != NULL); |
| + if (*arg != '\0') { |
| + return false; |
| + } |
| + parse_all = true; |
| + return true; |
| +} |
| + |
| + |
| static bool ProcessUseBlobsOption(const char* arg, |
| CommandLineOptions* vm_options) { |
| ASSERT(arg != NULL); |
| @@ -510,6 +522,7 @@ static struct { |
| // VM specific options to the standalone dart program. |
| { "--compile_all", ProcessCompileAllOption }, |
| + { "--parse_all", ProcessParseAllOption }, |
| { "--enable-vm-service", ProcessEnableVmServiceOption }, |
| { "--disable-service-origin-check", ProcessDisableServiceOriginCheckOption }, |
| { "--observe", ProcessObserveOption }, |
| @@ -795,10 +808,12 @@ static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri, |
| *error = strdup(VmService::GetErrorMessage()); |
| return NULL; |
| } |
| +#if 0 |
|
hausner
2016/09/09 16:31:07
Maybe remove this entirely in a separate change?
siva
2016/09/23 00:04:03
Removed the #if 0 ... #endif as I added a --parse-
|
| if (compile_all) { |
| result = Dart_CompileAll(); |
| CHECK_RESULT(result); |
| } |
| +#endif |
| Dart_ExitScope(); |
| Dart_ExitIsolate(); |
| return isolate; |
| @@ -1463,6 +1478,19 @@ bool RunMainIsolate(const char* script_name, |
| if (compile_all) { |
| result = Dart_CompileAll(); |
| CHECK_RESULT(result); |
| + Dart_ExitScope(); |
|
hausner
2016/09/09 17:30:51
This will actually break tests that execute the co
siva
2016/09/23 00:04:03
Removed this as compile_all is unchanged.
|
| + // Shutdown the isolate. |
| + Dart_ShutdownIsolate(); |
| + return false; |
| + } |
| + |
| + if (parse_all) { |
| + result = Dart_ParseAll(); |
| + CHECK_RESULT(result); |
| + Dart_ExitScope(); |
| + // Shutdown the isolate. |
| + Dart_ShutdownIsolate(); |
| + return false; |
| } |
| if (is_noopt || (gen_snapshot_kind == kAppAOT)) { |