Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(252)

Side by Side Diff: pkg/compiler/lib/src/common/resolution.dart

Issue 2898403002: Use failedAt in more places (Closed)
Patch Set: merge; address comments Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698