| 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; |
| 11 import '../dart_types.dart' show DartType, InterfaceType; | 11 import '../dart_types.dart' show DartType, InterfaceType; |
| 12 import '../elements/elements.dart' | 12 import '../elements/elements.dart' |
| 13 show | 13 show |
| 14 AstElement, | 14 AstElement, |
| 15 ClassElement, | 15 ClassElement, |
| 16 Element, | 16 Element, |
| 17 ErroneousElement, | 17 ErroneousElement, |
| 18 FunctionElement, | 18 FunctionElement, |
| 19 FunctionSignature, | 19 FunctionSignature, |
| 20 LocalFunctionElement, | 20 LocalFunctionElement, |
| 21 MetadataAnnotation, | 21 MetadataAnnotation, |
| 22 MethodElement, | 22 MethodElement, |
| 23 ResolvedAst, |
| 23 TypedefElement, | 24 TypedefElement, |
| 24 TypeVariableElement; | 25 TypeVariableElement; |
| 25 import '../enqueue.dart' show ResolutionEnqueuer; | 26 import '../enqueue.dart' show ResolutionEnqueuer; |
| 26 import '../options.dart' show ParserOptions; | 27 import '../options.dart' show ParserOptions; |
| 27 import '../parser/element_listener.dart' show ScannerOptions; | 28 import '../parser/element_listener.dart' show ScannerOptions; |
| 28 import '../tree/tree.dart' show AsyncForIn, Send, TypeAnnotation; | 29 import '../tree/tree.dart' show AsyncForIn, Send, TypeAnnotation; |
| 29 import '../universe/world_impact.dart' show WorldImpact; | 30 import '../universe/world_impact.dart' show WorldImpact; |
| 30 import 'work.dart' show ItemCompilationContext, WorkItem; | 31 import 'work.dart' show ItemCompilationContext, WorkItem; |
| 31 | 32 |
| 32 /// [WorkItem] used exclusively by the [ResolutionEnqueuer]. | 33 /// [WorkItem] used exclusively by the [ResolutionEnqueuer]. |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 void registerClass(ClassElement cls); | 201 void registerClass(ClassElement cls); |
| 201 void resolveMetadataAnnotation(MetadataAnnotation metadataAnnotation); | 202 void resolveMetadataAnnotation(MetadataAnnotation metadataAnnotation); |
| 202 FunctionSignature resolveSignature(FunctionElement function); | 203 FunctionSignature resolveSignature(FunctionElement function); |
| 203 DartType resolveTypeAnnotation(Element element, TypeAnnotation node); | 204 DartType resolveTypeAnnotation(Element element, TypeAnnotation node); |
| 204 | 205 |
| 205 bool hasBeenResolved(Element element); | 206 bool hasBeenResolved(Element element); |
| 206 | 207 |
| 207 ResolutionWorkItem createWorkItem( | 208 ResolutionWorkItem createWorkItem( |
| 208 Element element, ItemCompilationContext compilationContext); | 209 Element element, ItemCompilationContext compilationContext); |
| 209 | 210 |
| 211 /// Returns `true` if [element] as a fully computed [ResolvedAst]. |
| 212 bool hasResolvedAst(Element element); |
| 213 |
| 214 /// Returns the `ResolvedAst` for the [element]. |
| 215 ResolvedAst getResolvedAst(Element element); |
| 216 |
| 210 /// Returns `true` if the [ResolutionImpact] for [element] is cached. | 217 /// Returns `true` if the [ResolutionImpact] for [element] is cached. |
| 211 bool hasResolutionImpact(Element element); | 218 bool hasResolutionImpact(Element element); |
| 212 | 219 |
| 213 /// Returns the precomputed [ResolutionImpact] for [element]. | 220 /// Returns the precomputed [ResolutionImpact] for [element]. |
| 214 ResolutionImpact getResolutionImpact(Element element); | 221 ResolutionImpact getResolutionImpact(Element element); |
| 215 | 222 |
| 216 /// Returns the precomputed [WorldImpact] for [element]. | 223 /// Returns the precomputed [WorldImpact] for [element]. |
| 217 WorldImpact getWorldImpact(Element element); | 224 WorldImpact getWorldImpact(Element element); |
| 218 | 225 |
| 219 /// Computes the [WorldImpact] for [element]. | 226 /// Computes the [WorldImpact] for [element]. |
| (...skipping 10 matching lines...) Expand all Loading... |
| 230 } | 237 } |
| 231 | 238 |
| 232 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`. | 239 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`. |
| 233 abstract class Parsing { | 240 abstract class Parsing { |
| 234 DiagnosticReporter get reporter; | 241 DiagnosticReporter get reporter; |
| 235 void parsePatchClass(ClassElement cls); | 242 void parsePatchClass(ClassElement cls); |
| 236 measure(f()); | 243 measure(f()); |
| 237 ScannerOptions getScannerOptionsFor(Element element); | 244 ScannerOptions getScannerOptionsFor(Element element); |
| 238 ParserOptions get parserOptions; | 245 ParserOptions get parserOptions; |
| 239 } | 246 } |
| OLD | NEW |