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 library dart2js.common.resolution; | 5 library dart2js.common.resolution; |
6 | 6 |
7 import '../common.dart'; | 7 import '../common.dart'; |
8 import '../compile_time_constants.dart'; | 8 import '../compile_time_constants.dart'; |
9 import '../constants/expressions.dart' show ConstantExpression; | 9 import '../constants/expressions.dart' show ConstantExpression; |
10 import '../constants/values.dart' show ConstantValue; | 10 import '../constants/values.dart' show ConstantValue; |
11 import '../common_elements.dart' show CommonElements; | 11 import '../common_elements.dart' show CommonElements, ElementEnvironment; |
12 import '../elements/resolution_types.dart' show ResolutionDartType, Types; | 12 import '../elements/resolution_types.dart' show ResolutionDartType, Types; |
13 import '../elements/elements.dart' | 13 import '../elements/elements.dart' |
14 show | 14 show |
15 ClassElement, | 15 ClassElement, |
16 Element, | 16 Element, |
17 ExecutableElement, | 17 ExecutableElement, |
18 FunctionElement, | 18 FunctionElement, |
19 FunctionSignature, | 19 FunctionSignature, |
20 LibraryElement, | 20 LibraryElement, |
21 MemberElement, | 21 MemberElement, |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 bool isForeign(Element element) => false; | 115 bool isForeign(Element element) => false; |
116 | 116 |
117 /// Returns `true` if this target supports async/await. | 117 /// Returns `true` if this target supports async/await. |
118 bool get supportsAsyncAwait => true; | 118 bool get supportsAsyncAwait => true; |
119 } | 119 } |
120 | 120 |
121 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. | 121 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. |
122 abstract class Resolution { | 122 abstract class Resolution { |
123 ParsingContext get parsingContext; | 123 ParsingContext get parsingContext; |
124 DiagnosticReporter get reporter; | 124 DiagnosticReporter get reporter; |
| 125 ElementEnvironment get elementEnvironment; |
125 CommonElements get commonElements; | 126 CommonElements get commonElements; |
126 Types get types; | 127 Types get types; |
127 Target get target; | 128 Target get target; |
128 ResolverTask get resolver; | 129 ResolverTask get resolver; |
129 ResolutionEnqueuer get enqueuer; | 130 ResolutionEnqueuer get enqueuer; |
130 CompilerOptions get options; | 131 CompilerOptions get options; |
131 IdGenerator get idGenerator; | 132 IdGenerator get idGenerator; |
132 ConstantEnvironment get constants; | 133 ConstantEnvironment get constants; |
133 MirrorUsageAnalyzerTask get mirrorUsageAnalyzerTask; | 134 MirrorUsageAnalyzerTask get mirrorUsageAnalyzerTask; |
134 | 135 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 if (cls.isPatch) { | 252 if (cls.isPatch) { |
252 patchParser.parsePatchClassNode(cls); | 253 patchParser.parsePatchClassNode(cls); |
253 } | 254 } |
254 }); | 255 }); |
255 } | 256 } |
256 | 257 |
257 @override | 258 @override |
258 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 259 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
259 canUseNative: backend.canLibraryUseNative(element.library)); | 260 canUseNative: backend.canLibraryUseNative(element.library)); |
260 } | 261 } |
OLD | NEW |