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

Side by Side Diff: pkg/compiler/lib/src/resolved_visitor.dart

Issue 1083063002: Deprecate visitAssertSend and visitTypePrefixSend (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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 dart2js; 5 part of dart2js;
6 6
7 /// Enum for the visit methods added in [ResolvedVisitor]. 7 /// Enum for the visit methods added in [ResolvedVisitor].
8 // TODO(johnniwinther): Remove this. 8 // TODO(johnniwinther): Remove this.
9 enum ResolvedKind { 9 enum ResolvedKind {
10 ASSERT, 10 ASSERT,
(...skipping 20 matching lines...) Expand all
31 R visitDynamicSend(Send node); 31 R visitDynamicSend(Send node);
32 R visitStaticSend(Send node); 32 R visitStaticSend(Send node);
33 R handleSendSet(SendSet node); 33 R handleSendSet(SendSet node);
34 R handleNewExpression(NewExpression node); 34 R handleNewExpression(NewExpression node);
35 35
36 /// Visitor callback for a type literal. 36 /// Visitor callback for a type literal.
37 R visitTypeLiteralSend(Send node); 37 R visitTypeLiteralSend(Send node);
38 38
39 /// Visitor callback for the class prefix of a static access, like `Foo` in 39 /// Visitor callback for the class prefix of a static access, like `Foo` in
40 /// `Foo.staticField`. 40 /// `Foo.staticField`.
41 // TODO(johnniwinther): Remove this when not needed by the dart backend. 41 // TODO(johnniwinther): Remove this when not needed by the inferrer.
42 @deprecated
42 R visitTypePrefixSend(Send node); 43 R visitTypePrefixSend(Send node);
43 44
45 @deprecated
44 R visitAssertSend(Send node); 46 R visitAssertSend(Send node);
45 47
46 internalError(Spannable node, String reason); 48 internalError(Spannable node, String reason);
47 } 49 }
48 50
49 /// Visitor that returns the [ResolvedKind] corresponding to the called visitor 51 /// Visitor that returns the [ResolvedKind] corresponding to the called visitor
50 /// method. 52 /// method.
51 class ResolvedKindComputer implements ResolvedKindVisitor { 53 class ResolvedKindComputer implements ResolvedKindVisitor {
52 const ResolvedKindComputer(); 54 const ResolvedKindComputer();
53 55
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (sendStructure != null) { 176 if (sendStructure != null) {
175 var arg = sendVisitor == _resolvedKindDispatcher 177 var arg = sendVisitor == _resolvedKindDispatcher
176 ? kindVisitor : sendStructure; 178 ? kindVisitor : sendStructure;
177 return sendStructure.dispatch(sendVisitor, node, arg); 179 return sendStructure.dispatch(sendVisitor, node, arg);
178 } else { 180 } else {
179 return kindVisitor.visitStaticSend(node); 181 return kindVisitor.visitStaticSend(node);
180 } 182 }
181 } 183 }
182 } 184 }
183 185
186 @deprecated
187 R visitTypePrefixSend(Send node) {
188 return internalError(node, "visitTypePrefixSend is deprecated");
189 }
190
191 @deprecated
192 R visitAssertSend(Send node) {
193 return internalError(node, "visitAssertSend is deprecated");
194 }
195
184 bool checkResolvedKind(Node node, 196 bool checkResolvedKind(Node node,
185 ResolvedKind oldKind, 197 ResolvedKind oldKind,
186 ResolvedKind newKind) { 198 ResolvedKind newKind) {
187 return invariant(node, oldKind == newKind, message: '$oldKind != $newKind'); 199 return invariant(node, oldKind == newKind, message: '$oldKind != $newKind');
188 } 200 }
189 201
190 ResolvedKind computeResolvedKindFromStructure( 202 ResolvedKind computeResolvedKindFromStructure(
191 Node node, SemanticSendStructure structure) { 203 Node node, SemanticSendStructure structure) {
192 return structure.dispatch( 204 return structure.dispatch(
193 _resolvedKindDispatcher, node, const ResolvedKindComputer()); 205 _resolvedKindDispatcher, node, const ResolvedKindComputer());
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 762
751 @override 763 @override
752 R errorUnresolvedSuperIndex( 764 R errorUnresolvedSuperIndex(
753 Send node, 765 Send node,
754 Element function, 766 Element function,
755 Node index, 767 Node index,
756 ResolvedKindVisitor<R> visitor) { 768 ResolvedKindVisitor<R> visitor) {
757 return visitor.visitSuperSend(node); 769 return visitor.visitSuperSend(node);
758 } 770 }
759 } 771 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698