| 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; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 /// Removes the [WorldImpact] for [element] from the resolution cache. Later | 199 /// Removes the [WorldImpact] for [element] from the resolution cache. Later |
| 200 /// calls to [getWorldImpact] or [computeWorldImpact] returns an empty impact. | 200 /// calls to [getWorldImpact] or [computeWorldImpact] returns an empty impact. |
| 201 void uncacheWorldImpact(Element element); | 201 void uncacheWorldImpact(Element element); |
| 202 | 202 |
| 203 /// Removes the [WorldImpact]s for all [Element]s in the resolution cache. , | 203 /// Removes the [WorldImpact]s for all [Element]s in the resolution cache. , |
| 204 /// Later calls to [getWorldImpact] or [computeWorldImpact] returns an empty | 204 /// Later calls to [getWorldImpact] or [computeWorldImpact] returns an empty |
| 205 /// impact. | 205 /// impact. |
| 206 void emptyCache(); | 206 void emptyCache(); |
| 207 | 207 |
| 208 void forgetElement(Element element); | |
| 209 | |
| 210 /// Returns `true` if [value] is the top-level [proxy] annotation from the | 208 /// Returns `true` if [value] is the top-level [proxy] annotation from the |
| 211 /// core library. | 209 /// core library. |
| 212 bool isProxyConstant(ConstantValue value); | 210 bool isProxyConstant(ConstantValue value); |
| 213 } | 211 } |
| 214 | 212 |
| 215 /// A container of commonly used dependencies for tasks that involve parsing. | 213 /// A container of commonly used dependencies for tasks that involve parsing. |
| 216 abstract class ParsingContext { | 214 abstract class ParsingContext { |
| 217 factory ParsingContext(DiagnosticReporter reporter, ParserTask parser, | 215 factory ParsingContext(DiagnosticReporter reporter, ParserTask parser, |
| 218 PatchParserTask patchParser, Backend backend) = _ParsingContext; | 216 PatchParserTask patchParser, Backend backend) = _ParsingContext; |
| 219 | 217 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 250 if (cls.isPatch) { | 248 if (cls.isPatch) { |
| 251 patchParser.parsePatchClassNode(cls); | 249 patchParser.parsePatchClassNode(cls); |
| 252 } | 250 } |
| 253 }); | 251 }); |
| 254 } | 252 } |
| 255 | 253 |
| 256 @override | 254 @override |
| 257 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 255 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
| 258 canUseNative: backend.canLibraryUseNative(element.library)); | 256 canUseNative: backend.canLibraryUseNative(element.library)); |
| 259 } | 257 } |
| OLD | NEW |