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

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

Issue 839043002: More fatal errors to prevent crashes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/tests/compiler/dart2js/resolver_test.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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 assert(invariant(target, targetType != null, 736 assert(invariant(target, targetType != null,
737 message: 'Redirection target type has not been computed for ' 737 message: 'Redirection target type has not been computed for '
738 '$target')); 738 '$target'));
739 target = target.internalEffectiveTarget; 739 target = target.internalEffectiveTarget;
740 break; 740 break;
741 } 741 }
742 742
743 Element nextTarget = target.immediateRedirectionTarget; 743 Element nextTarget = target.immediateRedirectionTarget;
744 if (seen.contains(nextTarget)) { 744 if (seen.contains(nextTarget)) {
745 error(node, MessageKind.CYCLIC_REDIRECTING_FACTORY); 745 error(node, MessageKind.CYCLIC_REDIRECTING_FACTORY);
746 // TODO(ahe): Don't throw, recover from error.
747 throw new CompilerCancelledException(null);
746 break; 748 break;
747 } 749 }
748 seen.add(target); 750 seen.add(target);
749 target = nextTarget; 751 target = nextTarget;
750 } 752 }
751 753
752 if (targetType == null) { 754 if (targetType == null) {
753 assert(!target.isRedirectingFactory); 755 assert(!target.isRedirectingFactory);
754 targetType = target.enclosingClass.thisType; 756 targetType = target.enclosingClass.thisType;
755 } 757 }
(...skipping 4254 matching lines...) Expand 10 before | Expand all | Expand 10 after
5010 } 5012 }
5011 5013
5012 /// The result for the resolution of the `assert` method. 5014 /// The result for the resolution of the `assert` method.
5013 class AssertResult implements ResolutionResult { 5015 class AssertResult implements ResolutionResult {
5014 const AssertResult(); 5016 const AssertResult();
5015 5017
5016 Element get element => null; 5018 Element get element => null;
5017 5019
5018 String toString() => 'AssertResult()'; 5020 String toString() => 'AssertResult()';
5019 } 5021 }
OLDNEW
« no previous file with comments | « no previous file | dart/tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698