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

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

Issue 880973005: Support async/await in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment + status for new_backend 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/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 9b3f9c920c7a69395e76e62a669473d6b70a014f..173f421d514a20b58b987ece1ea54dc82980d738 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -743,6 +743,9 @@ abstract class Compiler implements DiagnosticListener {
/// `true` if async/await features are supported.
final bool enableAsyncAwait;
+ /// `true` if the compiler uses the [JavaScriptBackend].
+ final bool emitJavaScript;
+
/// If `true`, some values are cached for reuse in incremental compilation.
/// Incremental compilation is basically calling [run] more than once.
final bool hasIncrementalSupport;
@@ -1004,12 +1007,14 @@ abstract class Compiler implements DiagnosticListener {
this.suppressWarnings: false,
bool hasIncrementalSupport: false,
this.enableExperimentalMirrors: false,
- this.enableAsyncAwait: false,
+ bool enableAsyncAwait: false,
this.allowNativeExtensions: false,
this.generateCodeWithCompileTimeErrors: false,
api.CompilerOutputProvider outputProvider,
List<String> strips: const []})
- : this.disableTypeInferenceFlag =
+ : this.emitJavaScript = emitJavaScript,
+ this.enableAsyncAwait = enableAsyncAwait || !emitJavaScript,
+ this.disableTypeInferenceFlag =
disableTypeInferenceFlag || !emitJavaScript,
this.analyzeOnly =
analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag,

Powered by Google App Engine
This is Rietveld 408576698