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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 11411119: Clean up warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | Annotate | Revision Log
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 elements; 5 library elements;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed. 9 // TODO(ahe): Rename prefix to 'api' when VM bug is fixed.
10 import '../../compiler.dart' as api_e; 10 import '../../compiler.dart' as api_e;
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 : super(name, kind, enclosing) { 1171 : super(name, kind, enclosing) {
1172 assert(modifiers != null); 1172 assert(modifiers != null);
1173 defaultImplementation = this; 1173 defaultImplementation = this;
1174 } 1174 }
1175 1175
1176 bool get isPatched => patch != null; 1176 bool get isPatched => patch != null;
1177 bool get isPatch => origin != null; 1177 bool get isPatch => origin != null;
1178 1178
1179 FunctionElement get redirectionTarget { 1179 FunctionElement get redirectionTarget {
1180 if (this == defaultImplementation) return this; 1180 if (this == defaultImplementation) return this;
1181 Element target = defaultImplementation; 1181 var target = defaultImplementation;
ngeoffray 2012/11/21 10:22:11 I can't find which assignment will trigger the war
karlklose 2012/11/21 11:33:32 target.defaultImplementation in the loop condition
1182 Set<Element> seen = new Set<Element>(); 1182 Set<Element> seen = new Set<Element>();
1183 seen.add(target); 1183 seen.add(target);
1184 while (!target.isErroneous() && target != target.defaultImplementation) { 1184 while (!target.isErroneous() && target != target.defaultImplementation) {
1185 target = target.defaultImplementation; 1185 target = target.defaultImplementation;
1186 if (seen.contains(target)) { 1186 if (seen.contains(target)) {
1187 // TODO(ahe): This is expedient for now, but it should be 1187 // TODO(ahe): This is expedient for now, but it should be
1188 // checked by the resolver. Keeping http://dartbug.com/3970 1188 // checked by the resolver. Keeping http://dartbug.com/3970
1189 // open to track this. 1189 // open to track this.
1190 throw new SpannableAssertionFailure( 1190 throw new SpannableAssertionFailure(
1191 target, 'redirecting factory leads to cycle'); 1191 target, 'redirecting factory leads to cycle');
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2051 2051
2052 MetadataAnnotation ensureResolved(Compiler compiler) { 2052 MetadataAnnotation ensureResolved(Compiler compiler) {
2053 if (resolutionState == STATE_NOT_STARTED) { 2053 if (resolutionState == STATE_NOT_STARTED) {
2054 compiler.resolver.resolveMetadataAnnotation(this); 2054 compiler.resolver.resolveMetadataAnnotation(this);
2055 } 2055 }
2056 return this; 2056 return this;
2057 } 2057 }
2058 2058
2059 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2059 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2060 } 2060 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698