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, |