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

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

Issue 1093363002: Refactor DartTypeVisitor and ElementVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
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 4120 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 4131
4132 void checkCyclicReference() { 4132 void checkCyclicReference() {
4133 element.checkCyclicReference(compiler); 4133 element.checkCyclicReference(compiler);
4134 } 4134 }
4135 addDeferredAction(element, checkCyclicReference); 4135 addDeferredAction(element, checkCyclicReference);
4136 } 4136 }
4137 } 4137 }
4138 4138
4139 // TODO(johnniwinther): Replace with a traversal on the AST when the type 4139 // TODO(johnniwinther): Replace with a traversal on the AST when the type
4140 // annotations in typedef alias are stored in a [TreeElements] mapping. 4140 // annotations in typedef alias are stored in a [TreeElements] mapping.
4141 class TypedefCyclicVisitor extends DartTypeVisitor { 4141 class TypedefCyclicVisitor extends BaseDartTypeVisitor {
4142 final Compiler compiler; 4142 final Compiler compiler;
4143 final TypedefElementX element; 4143 final TypedefElementX element;
4144 bool hasCyclicReference = false; 4144 bool hasCyclicReference = false;
4145 4145
4146 Link<TypedefElement> seenTypedefs = const Link<TypedefElement>(); 4146 Link<TypedefElement> seenTypedefs = const Link<TypedefElement>();
4147 4147
4148 int seenTypedefsCount = 0; 4148 int seenTypedefsCount = 0;
4149 4149
4150 Link<TypeVariableElement> seenTypeVariables = 4150 Link<TypeVariableElement> seenTypeVariables =
4151 const Link<TypeVariableElement>(); 4151 const Link<TypeVariableElement>();
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
5113 } 5113 }
5114 5114
5115 /// The result for the resolution of the `assert` method. 5115 /// The result for the resolution of the `assert` method.
5116 class AssertResult implements ResolutionResult { 5116 class AssertResult implements ResolutionResult {
5117 const AssertResult(); 5117 const AssertResult();
5118 5118
5119 Element get element => null; 5119 Element get element => null;
5120 5120
5121 String toString() => 'AssertResult()'; 5121 String toString() => 'AssertResult()';
5122 } 5122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698