| 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..2359ad26a9f0182eaecb16939cdf43d008616389 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' is currently only supported in "
|
| + "combination with the '--analyze-only' option.");
|
| + }
|
|
|
| diagnosticHandler.info('Package root is $packageRoot');
|
|
|
|
|