Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: sdk/lib/_internal/compiler/implementation/apiimpl.dart

Issue 675113002: Support async/await in the dart2js frontend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update unittests Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/apiimpl.dart
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index 5670d49a41a7433583ff7d4d4d0e36ddd6e43acf..e862e5a5adf83ad1f9a44c9b0e894e51ce691b7a 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -77,7 +77,8 @@ class Compiler extends leg.Compiler {
hasIncrementalSupport:
forceIncrementalSupport ||
hasOption(options, '--incremental-support'),
- suppressWarnings: hasOption(options, '--suppress-warnings')) {
+ suppressWarnings: hasOption(options, '--suppress-warnings'),
+ enableAsyncAwait: hasOption(options, '--enable-async')) {
tasks.addAll([
userHandlerTask = new leg.GenericTask('Diagnostic handler', this),
userProviderTask = new leg.GenericTask('Input provider', this),
@@ -88,6 +89,10 @@ class Compiler extends leg.Compiler {
if (packageRoot != null && !packageRoot.path.endsWith("/")) {
throw new ArgumentError("packageRoot must end with a /");
}
+ if (enableAsyncAwait && !analyzeOnly) {
+ throw new ArgumentError(
+ "--enable-async currently only supported with --analyze-only");
floitsch 2014/11/03 17:55:54 --enable-async is currently ...
Johnni Winther 2014/11/04 12:24:33 Done.
+ }
}
static String extractStringOption(List<String> options,

Powered by Google App Engine
This is Rietveld 408576698