OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /** | 7 /** |
8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
9 * compiled. | 9 * compiled. |
10 */ | 10 */ |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 | 714 |
715 /// Map containing information about the warnings and hints that have been | 715 /// Map containing information about the warnings and hints that have been |
716 /// suppressed for each library. | 716 /// suppressed for each library. |
717 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{}; | 717 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{}; |
718 | 718 |
719 final bool suppressWarnings; | 719 final bool suppressWarnings; |
720 | 720 |
721 /// `true` if async/await features are supported. | 721 /// `true` if async/await features are supported. |
722 final bool enableAsyncAwait; | 722 final bool enableAsyncAwait; |
723 | 723 |
| 724 /// `true` if enum declarations are supported. |
| 725 final bool enableEnums; |
| 726 |
724 /// If `true`, some values are cached for reuse in incremental compilation. | 727 /// If `true`, some values are cached for reuse in incremental compilation. |
725 /// Incremental compilation is basically calling [run] more than once. | 728 /// Incremental compilation is basically calling [run] more than once. |
726 final bool hasIncrementalSupport; | 729 final bool hasIncrementalSupport; |
727 | 730 |
728 api.CompilerOutputProvider outputProvider; | 731 api.CompilerOutputProvider outputProvider; |
729 | 732 |
730 bool disableInlining = false; | 733 bool disableInlining = false; |
731 | 734 |
732 /// True if compilation was aborted with a [CompilerCancelledException]. Only | 735 /// True if compilation was aborted with a [CompilerCancelledException]. Only |
733 /// set after Future retuned by [run] has completed. | 736 /// set after Future retuned by [run] has completed. |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 this.sourceMapUri: null, | 961 this.sourceMapUri: null, |
959 this.outputUri: null, | 962 this.outputUri: null, |
960 this.buildId: UNDETERMINED_BUILD_ID, | 963 this.buildId: UNDETERMINED_BUILD_ID, |
961 this.terseDiagnostics: false, | 964 this.terseDiagnostics: false, |
962 this.dumpInfo: false, | 965 this.dumpInfo: false, |
963 this.showPackageWarnings: false, | 966 this.showPackageWarnings: false, |
964 this.useContentSecurityPolicy: false, | 967 this.useContentSecurityPolicy: false, |
965 this.suppressWarnings: false, | 968 this.suppressWarnings: false, |
966 bool hasIncrementalSupport: false, | 969 bool hasIncrementalSupport: false, |
967 this.enableAsyncAwait: false, | 970 this.enableAsyncAwait: false, |
| 971 this.enableEnums: false, |
968 api.CompilerOutputProvider outputProvider, | 972 api.CompilerOutputProvider outputProvider, |
969 List<String> strips: const []}) | 973 List<String> strips: const []}) |
970 : this.disableTypeInferenceFlag = | 974 : this.disableTypeInferenceFlag = |
971 disableTypeInferenceFlag || !emitJavaScript, | 975 disableTypeInferenceFlag || !emitJavaScript, |
972 this.analyzeOnly = | 976 this.analyzeOnly = |
973 analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag, | 977 analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag, |
974 this.analyzeSignaturesOnly = analyzeSignaturesOnly, | 978 this.analyzeSignaturesOnly = analyzeSignaturesOnly, |
975 this.analyzeAllFlag = analyzeAllFlag, | 979 this.analyzeAllFlag = analyzeAllFlag, |
976 this.hasIncrementalSupport = hasIncrementalSupport, | 980 this.hasIncrementalSupport = hasIncrementalSupport, |
977 cacheStrategy = new CacheStrategy(hasIncrementalSupport), | 981 cacheStrategy = new CacheStrategy(hasIncrementalSupport), |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2175 int warnings = 0; | 2179 int warnings = 0; |
2176 int hints = 0; | 2180 int hints = 0; |
2177 } | 2181 } |
2178 | 2182 |
2179 class GenericTask extends CompilerTask { | 2183 class GenericTask extends CompilerTask { |
2180 final String name; | 2184 final String name; |
2181 | 2185 |
2182 GenericTask(this.name, Compiler compiler) | 2186 GenericTask(this.name, Compiler compiler) |
2183 : super(compiler); | 2187 : super(compiler); |
2184 } | 2188 } |
OLD | NEW |