| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 } | 48 } |
| 49 | 49 |
| 50 class _ResolutionWorkItem extends WorkItem implements ResolutionWorkItem { | 50 class _ResolutionWorkItem extends WorkItem implements ResolutionWorkItem { |
| 51 bool _isAnalyzed = false; | 51 bool _isAnalyzed = false; |
| 52 final MemberElement element; | 52 final MemberElement element; |
| 53 final Resolution resolution; | 53 final Resolution resolution; |
| 54 | 54 |
| 55 _ResolutionWorkItem(this.resolution, this.element); | 55 _ResolutionWorkItem(this.resolution, this.element); |
| 56 | 56 |
| 57 WorldImpact run() { | 57 WorldImpact run() { |
| 58 assert(invariant(element, !_isAnalyzed, | 58 assert(!_isAnalyzed, |
| 59 message: 'Element ${element} has already been analyzed')); | 59 failedAt(element, 'Element ${element} has already been analyzed')); |
| 60 WorldImpact impact = resolution.computeWorldImpact(element); | 60 WorldImpact impact = resolution.computeWorldImpact(element); |
| 61 _isAnalyzed = true; | 61 _isAnalyzed = true; |
| 62 return impact; | 62 return impact; |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 class ResolutionImpact extends WorldImpact { | 66 class ResolutionImpact extends WorldImpact { |
| 67 const ResolutionImpact(); | 67 const ResolutionImpact(); |
| 68 | 68 |
| 69 Iterable<Feature> get features => const <Feature>[]; | 69 Iterable<Feature> get features => const <Feature>[]; |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 if (cls.isPatch) { | 251 if (cls.isPatch) { |
| 252 patchParser.parsePatchClassNode(cls); | 252 patchParser.parsePatchClassNode(cls); |
| 253 } | 253 } |
| 254 }); | 254 }); |
| 255 } | 255 } |
| 256 | 256 |
| 257 @override | 257 @override |
| 258 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( | 258 ScannerOptions getScannerOptionsFor(Element element) => new ScannerOptions( |
| 259 canUseNative: backend.canLibraryUseNative(element.library)); | 259 canUseNative: backend.canLibraryUseNative(element.library)); |
| 260 } | 260 } |
| OLD | NEW |