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

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: Implement new ssa-nodes in ssa-tracer. Created 5 years, 11 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
Index: pkg/compiler/lib/src/dart2js.dart
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index d0e9a5b8a19e66bcd140f485c23c3da93454ae07..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) {
- 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.");

Powered by Google App Engine
This is Rietveld 408576698