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

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

Issue 1154853004: Fix invariant in ResolvedVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 if (!Elements.isUnresolved(element) && element.impliesType) { 109 if (!Elements.isUnresolved(element) && element.impliesType) {
110 return visitor.visitTypePrefixSend(node); 110 return visitor.visitTypePrefixSend(node);
111 } else { 111 } else {
112 return visitor.visitGetterSend(node); 112 return visitor.visitGetterSend(node);
113 } 113 }
114 } else if (element != null && Initializers.isConstructorRedirect(node)) { 114 } else if (element != null && Initializers.isConstructorRedirect(node)) {
115 return visitor.visitStaticSend(node); 115 return visitor.visitStaticSend(node);
116 } else if (Elements.isClosureSend(node, element)) { 116 } else if (Elements.isClosureSend(node, element)) {
117 return visitor.visitClosureSend(node); 117 return visitor.visitClosureSend(node);
118 } else { 118 } else {
119 if (Elements.isUnresolved(element)) { 119 if (node.isConditional) {
120 return visitor.visitDynamicSend(node);
121 } else if (Elements.isUnresolved(element)) {
120 if (element == null) { 122 if (element == null) {
121 // Example: f() with 'f' unbound. 123 // Example: f() with 'f' unbound.
122 // This can only happen inside an instance method. 124 // This can only happen inside an instance method.
123 return visitor.visitDynamicSend(node); 125 return visitor.visitDynamicSend(node);
124 } else { 126 } else {
125 return visitor.visitStaticSend(node); 127 return visitor.visitStaticSend(node);
126 } 128 }
127 } else if (element.isInstanceMember) { 129 } else if (element.isInstanceMember) {
128 // Example: f() with 'f' bound to instance method. 130 // Example: f() with 'f' bound to instance method.
129 return visitor.visitDynamicSend(node); 131 return visitor.visitDynamicSend(node);
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 790
789 @override 791 @override
790 R visitSuperIndex( 792 R visitSuperIndex(
791 Send node, 793 Send node,
792 FunctionElement function, 794 FunctionElement function,
793 Node index, 795 Node index,
794 ResolvedKindVisitor<R> visitor) { 796 ResolvedKindVisitor<R> visitor) {
795 return visitor.visitSuperSend(node); 797 return visitor.visitSuperSend(node);
796 } 798 }
797 } 799 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698