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

Unified Diff: pkg/compiler/lib/src/dart2js.dart

Issue 839323003: Implementation of async-await transformation on js ast. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 10 months 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 4aad6af0011cc5dc1223e7f8c804fa2c2abc269b..1fbf54358fbbd205d5da824aab4b9db87a77ea37 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -114,7 +114,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
bool stripArgumentSet = false;
bool analyzeOnly = false;
bool analyzeAll = false;
- bool enableAsyncAwait = false;
bool allowNativeExtensions = false;
bool trustTypeAnnotations = false;
bool trustPrimitives = false;
@@ -192,11 +191,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
passThrough(argument);
}
- setEnableAsync(String argument) {
- enableAsyncAwait = true;
- passThrough(argument);
- }
-
setAllowNativeExtensions(String argument) {
allowNativeExtensions = true;
passThrough(argument);
@@ -340,7 +334,12 @@ Future<api.CompilationResult> compile(List<String> argv) {
new OptionHandler('--show-package-warnings', passThrough),
new OptionHandler('--csp', passThrough),
new OptionHandler('--enable-experimental-mirrors', passThrough),
- new OptionHandler('--enable-async', setEnableAsync),
+ new OptionHandler('--enable-async', (_) {
+ diagnosticHandler.info(
+ "Option '--enable-async' is no longer needed. "
+ "Async-await is supported by default.",
+ api.Diagnostic.HINT);
+ }),
new OptionHandler('--enable-enum', (_) {
diagnosticHandler.info(
"Option '--enable-enum' is no longer needed. "
@@ -410,10 +409,6 @@ Future<api.CompilationResult> compile(List<String> argv) {
}
if (analyzeAll) analyzeOnly = true;
if (!analyzeOnly) {
- if (enableAsyncAwait && outputLanguage != OUTPUT_LANGUAGE_DART) {
- helpAndFail("Option '--enable-async' is currently only supported in "
- "combination with the '--analyze-only' option.");
- }
if (allowNativeExtensions) {
helpAndFail("Option '--allow-native-extensions' is only supported in "
"combination with the '--analyze-only' option.");
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698