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 '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
9 import '../constants/expressions.dart' show ConstantExpression; | 9 import '../constants/expressions.dart' show ConstantExpression; |
10 import '../core_types.dart' show CoreTypes; | 10 import '../core_types.dart' show CoreTypes; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 } | 184 } |
185 | 185 |
186 String toString() { | 186 String toString() { |
187 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; | 187 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; |
188 } | 188 } |
189 } | 189 } |
190 | 190 |
191 /// Interface for the accessing the front-end analysis. | 191 /// Interface for the accessing the front-end analysis. |
192 // TODO(johnniwinther): Find a better name for this. | 192 // TODO(johnniwinther): Find a better name for this. |
193 abstract class Frontend { | 193 abstract class Frontend { |
194 /// Returns `true` if [element] has a [ResolvedAst]. | |
195 bool hasResolvedAst(ExecutableElement element); | |
196 | |
197 /// Returns the `ResolvedAst` for the [element]. | |
198 ResolvedAst getResolvedAst(ExecutableElement element); | |
199 | |
200 /// Returns the [ResolutionImpact] for [element]. | 194 /// Returns the [ResolutionImpact] for [element]. |
201 ResolutionImpact getResolutionImpact(Element element); | 195 ResolutionImpact getResolutionImpact(Element element); |
202 } | 196 } |
203 | 197 |
204 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. | 198 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. |
205 abstract class Resolution implements Frontend { | 199 abstract class Resolution implements Frontend { |
206 ParsingContext get parsingContext; | 200 ParsingContext get parsingContext; |
207 DiagnosticReporter get reporter; | 201 DiagnosticReporter get reporter; |
208 CoreTypes get coreTypes; | 202 CoreTypes get coreTypes; |
209 | 203 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 if (cls.isPatch) { | 302 if (cls.isPatch) { |
309 patchParser.parsePatchClassNode(cls); | 303 patchParser.parsePatchClassNode(cls); |
310 } | 304 } |
311 }); | 305 }); |
312 } | 306 } |
313 | 307 |
314 @override | 308 @override |
315 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 309 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
316 canUseNative: backend.canLibraryUseNative(element.library)); | 310 canUseNative: backend.canLibraryUseNative(element.library)); |
317 } | 311 } |
OLD | NEW |