Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/dart2js.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| index b0a760d5550f3a98a6f42fb6fa0d83e0844ac196..fdd244e0d9e80b16187d2a0825e4602f9c73b34d 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart |
| @@ -114,6 +114,7 @@ Future compile(List<String> argv) { |
| bool stripArgumentSet = false; |
| bool analyzeOnly = false; |
| bool analyzeAll = false; |
| + bool enableAsyncAwait = false; |
| bool trustTypeAnnotations = false; |
| bool checkedMode = false; |
| // List of provided options that imply that output is expected. |
| @@ -189,6 +190,11 @@ Future compile(List<String> argv) { |
| passThrough(argument); |
| } |
| + setEnableAsync(String argument) { |
| + enableAsyncAwait = true; |
| + passThrough(argument); |
| + } |
| + |
| setVerbose(_) { |
| diagnosticHandler.verbose = true; |
| passThrough('--verbose'); |
| @@ -317,6 +323,7 @@ Future compile(List<String> argv) { |
| (_) => hasDisallowUnsafeEval = true), |
| new OptionHandler('--show-package-warnings', passThrough), |
| new OptionHandler('--csp', passThrough), |
| + new OptionHandler('--enable-async', setEnableAsync), |
| new OptionHandler('-D.+=.*', addInEnvironment), |
| // The following two options must come last. |
| @@ -377,6 +384,10 @@ Future compile(List<String> argv) { |
| api.Diagnostic.INFO); |
| } |
| if (analyzeAll) analyzeOnly = true; |
| + if (enableAsyncAwait && !analyzeOnly) { |
| + helpAndFail("Option '--enable-async' currently only supported together " |
|
floitsch
2014/11/03 17:55:54
... is currently ...
... in combination with ...
Johnni Winther
2014/11/04 12:24:33
Done.
|
| + "with the '--analyze-only' option."); |
| + } |
| diagnosticHandler.info('Package root is $packageRoot'); |