| 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 ResolutionWorkItem createWorkItem(MemberElement element); | 170 ResolutionWorkItem createWorkItem(MemberElement element); |
| 171 | 171 |
| 172 /// Returns `true` if [element] as a fully computed [ResolvedAst]. | 172 /// Returns `true` if [element] as a fully computed [ResolvedAst]. |
| 173 bool hasResolvedAst(ExecutableElement element); | 173 bool hasResolvedAst(ExecutableElement element); |
| 174 | 174 |
| 175 /// Returns the `ResolvedAst` for the [element]. | 175 /// Returns the `ResolvedAst` for the [element]. |
| 176 ResolvedAst getResolvedAst(ExecutableElement element); | 176 ResolvedAst getResolvedAst(ExecutableElement element); |
| 177 | 177 |
| 178 /// Returns `true` if the [ResolutionImpact] for [element] is cached. | 178 /// Returns `true` if the [ResolutionImpact] for [element] is cached. |
| 179 bool hasResolutionImpact(Element element); | 179 bool hasResolutionImpact(MemberElement element); |
| 180 | 180 |
| 181 /// Returns the precomputed [ResolutionImpact] for [element]. | 181 /// Returns the precomputed [ResolutionImpact] for [element]. |
| 182 ResolutionImpact getResolutionImpact(Element element); | 182 ResolutionImpact getResolutionImpact(MemberElement element); |
| 183 | 183 |
| 184 /// Returns the [ResolvedAst] for [element], computing it if necessary. | 184 /// Returns the [ResolvedAst] for [element], computing it if necessary. |
| 185 ResolvedAst computeResolvedAst(Element element); | 185 ResolvedAst computeResolvedAst(MemberElement element); |
| 186 | 186 |
| 187 /// Returns the precomputed [WorldImpact] for [element]. | 187 /// Returns the precomputed [WorldImpact] for [element]. |
| 188 WorldImpact getWorldImpact(Element element); | 188 WorldImpact getWorldImpact(MemberElement element); |
| 189 | 189 |
| 190 /// Computes the [WorldImpact] for [element]. | 190 /// Computes the [WorldImpact] for [element]. |
| 191 WorldImpact computeWorldImpact(Element element); | 191 WorldImpact computeWorldImpact(MemberElement element); |
| 192 | 192 |
| 193 WorldImpact transformResolutionImpact( | 193 WorldImpact transformResolutionImpact( |
| 194 Element element, ResolutionImpact resolutionImpact); | 194 MemberElement element, ResolutionImpact resolutionImpact); |
| 195 | 195 |
| 196 /// Removes the [WorldImpact] for [element] from the resolution cache. Later | 196 /// Removes the [WorldImpact] for [element] from the resolution cache. Later |
| 197 /// calls to [getWorldImpact] or [computeWorldImpact] returns an empty impact. | 197 /// calls to [getWorldImpact] or [computeWorldImpact] returns an empty impact. |
| 198 void uncacheWorldImpact(Element element); | 198 void uncacheWorldImpact(MemberElement element); |
| 199 | 199 |
| 200 /// Removes the [WorldImpact]s for all [Element]s in the resolution cache. , | 200 /// Removes the [WorldImpact]s for all [Element]s in the resolution cache. , |
| 201 /// Later calls to [getWorldImpact] or [computeWorldImpact] returns an empty | 201 /// Later calls to [getWorldImpact] or [computeWorldImpact] returns an empty |
| 202 /// impact. | 202 /// impact. |
| 203 void emptyCache(); | 203 void emptyCache(); |
| 204 | 204 |
| 205 /// Returns `true` if [value] is the top-level [proxy] annotation from the | 205 /// Returns `true` if [value] is the top-level [proxy] annotation from the |
| 206 /// core library. | 206 /// core library. |
| 207 bool isProxyConstant(ConstantValue value); | 207 bool isProxyConstant(ConstantValue value); |
| 208 } | 208 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 if (cls.isPatch) { | 252 if (cls.isPatch) { |
| 253 patchParser.parsePatchClassNode(cls); | 253 patchParser.parsePatchClassNode(cls); |
| 254 } | 254 } |
| 255 }); | 255 }); |
| 256 } | 256 } |
| 257 | 257 |
| 258 @override | 258 @override |
| 259 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 259 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
| 260 canUseNative: backend.canLibraryUseNative(element.library)); | 260 canUseNative: backend.canLibraryUseNative(element.library)); |
| 261 } | 261 } |
| OLD | NEW |