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

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: Updated cf. comments 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/compiler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fdabf68e5894ce7346a2b6437f0c0c1b2bb8c751 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 is currently only supported with --analyze-only");
+ }
}
static String extractStringOption(List<String> options,
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698