Chromium Code Reviews| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 return type == other.type && | 175 return type == other.type && |
| 176 isConstant == other.isConstant && | 176 isConstant == other.isConstant && |
| 177 isEmpty == other.isEmpty; | 177 isEmpty == other.isEmpty; |
| 178 } | 178 } |
| 179 | 179 |
| 180 String toString() { | 180 String toString() { |
| 181 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; | 181 return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)'; |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 /// Interface for the accessing the front-end analysis. | |
| 186 abstract class Frontend { | |
|
Siggi Cherem (dart-lang)
2016/04/15 15:42:14
I ponder about the name here.... "Frontend" makes
Johnni Winther
2016/04/18 08:05:43
'ResolutionProvider' is semantically the best but
| |
| 187 /// Returns the `ResolvedAst` for the [element]. | |
| 188 ResolvedAst getResolvedAst(Element element); | |
| 189 | |
| 190 /// Returns the [ResolutionImpact] for [element]. | |
| 191 ResolutionImpact getResolutionImpact(Element element); | |
| 192 } | |
| 193 | |
| 185 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. | 194 // TODO(johnniwinther): Rename to `Resolver` or `ResolverContext`. |
| 186 abstract class Resolution { | 195 abstract class Resolution extends Frontend { |
|
Siggi Cherem (dart-lang)
2016/04/15 15:42:14
it doesn't' really matter, but for some reason thi
Johnni Winther
2016/04/18 08:05:43
Done.
| |
| 187 Parsing get parsing; | 196 Parsing get parsing; |
| 188 DiagnosticReporter get reporter; | 197 DiagnosticReporter get reporter; |
| 189 CoreTypes get coreTypes; | 198 CoreTypes get coreTypes; |
| 190 | 199 |
| 191 /// If set to `true` resolution caches will not be cleared. Use this only for | 200 /// If set to `true` resolution caches will not be cleared. Use this only for |
| 192 /// testing. | 201 /// testing. |
| 193 bool retainCachesForTesting; | 202 bool retainCachesForTesting; |
| 194 | 203 |
| 195 void resolveTypedef(TypedefElement typdef); | 204 void resolveTypedef(TypedefElement typdef); |
| 196 void resolveClass(ClassElement cls); | 205 void resolveClass(ClassElement cls); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 233 } | 242 } |
| 234 | 243 |
| 235 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`. | 244 // TODO(johnniwinther): Rename to `Parser` or `ParsingContext`. |
| 236 abstract class Parsing { | 245 abstract class Parsing { |
| 237 DiagnosticReporter get reporter; | 246 DiagnosticReporter get reporter; |
| 238 void parsePatchClass(ClassElement cls); | 247 void parsePatchClass(ClassElement cls); |
| 239 measure(f()); | 248 measure(f()); |
| 240 ScannerOptions getScannerOptionsFor(Element element); | 249 ScannerOptions getScannerOptionsFor(Element element); |
| 241 ParserOptions get parserOptions; | 250 ParserOptions get parserOptions; |
| 242 } | 251 } |
| OLD | NEW |