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

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

Issue 1262363003: Handle super index SendSet operations. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update comments. Created 5 years, 4 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
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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.semantics_visitor; 5 part of dart2js.semantics_visitor;
6 6
7 /// Interface for bulk handling of a [Node] in a semantic visitor. 7 /// Interface for bulk handling of a [Node] in a semantic visitor.
8 abstract class BulkHandle<R, A> { 8 abstract class BulkHandle<R, A> {
9 /// Handle [node] either regardless of semantics or to report that [node] is 9 /// Handle [node] either regardless of semantics or to report that [node] is
10 /// unhandled. [message] contains a message template for the latter case: 10 /// unhandled. [message] contains a message template for the latter case:
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 @override 113 @override
114 R errorInvalidSet( 114 R errorInvalidSet(
115 Send node, 115 Send node,
116 ErroneousElement error, 116 ErroneousElement error,
117 Node rhs, 117 Node rhs,
118 A arg) { 118 A arg) {
119 return bulkHandleError(node, error, arg); 119 return bulkHandleError(node, error, arg);
120 } 120 }
121
122 @override
123 R errorInvalidUnary(
124 Send node,
125 UnaryOperator operator,
126 ErroneousElement error,
127 A arg) {
128 return bulkHandleError(node, error, arg);
129 }
130
131 @override
132 R errorInvalidEquals(
133 Send node,
134 ErroneousElement error,
135 Node right,
136 A arg) {
137 return bulkHandleError(node, error, arg);
138 }
139
140 @override
141 R errorInvalidNotEquals(
142 Send node,
143 ErroneousElement error,
144 Node right,
145 A arg) {
146 return bulkHandleError(node, error, arg);
147 }
148
149 @override
150 R errorInvalidBinary(
151 Send node,
152 ErroneousElement error,
153 BinaryOperator operator,
154 Node right,
155 A arg) {
156 return bulkHandleError(node, error, arg);
157 }
158
159 @override
160 R errorInvalidIndex(
161 Send node,
162 ErroneousElement error,
163 Node index,
164 A arg) {
165 return bulkHandleError(node, error, arg);
166 }
167
168 @override
169 R errorInvalidIndexSet(
170 Send node,
171 ErroneousElement error,
172 Node index,
173 Node rhs,
174 A arg) {
175 return bulkHandleError(node, error, arg);
176 }
177
178 @override
179 R errorInvalidCompoundIndexSet(
180 Send node,
181 ErroneousElement error,
182 Node index,
183 AssignmentOperator operator,
184 Node rhs,
185 A arg) {
186 return bulkHandleError(node, error, arg);
187 }
188
189 @override
190 R errorInvalidIndexPrefix(
191 Send node,
192 ErroneousElement error,
193 Node index,
194 IncDecOperator operator,
195 A arg) {
196 return bulkHandleError(node, error, arg);
197 }
198
199 @override
200 R errorInvalidIndexPostfix(
201 Send node,
202 ErroneousElement error,
203 Node index,
204 IncDecOperator operator,
205 A arg) {
206 return bulkHandleError(node, error, arg);
207 }
121 } 208 }
122 209
123 /// Mixin that implements all `visitXPrefix` methods of [SemanticSendVisitor] by 210 /// Mixin that implements all `visitXPrefix` methods of [SemanticSendVisitor] by
124 /// delegating to a bulk handler. 211 /// delegating to a bulk handler.
125 /// 212 ///
126 /// Use this mixin to provide a trivial implementation for all `visitXPrefix` 213 /// Use this mixin to provide a trivial implementation for all `visitXPrefix`
127 /// methods. 214 /// methods.
128 abstract class PrefixBulkMixin<R, A> 215 abstract class PrefixBulkMixin<R, A>
129 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { 216 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
130 217
(...skipping 3511 matching lines...) Expand 10 before | Expand all | Expand 10 after
3642 R errorInvalidSet( 3729 R errorInvalidSet(
3643 Send node, 3730 Send node,
3644 ErroneousElement error, 3731 ErroneousElement error,
3645 Node rhs, 3732 Node rhs,
3646 A arg) { 3733 A arg) {
3647 apply(rhs, arg); 3734 apply(rhs, arg);
3648 return null; 3735 return null;
3649 } 3736 }
3650 3737
3651 @override 3738 @override
3739 R errorInvalidUnary(
3740 Send node,
3741 UnaryOperator operator,
3742 ErroneousElement error,
3743 A arg) {
3744 return null;
3745 }
3746
3747 @override
3748 R errorInvalidEquals(
3749 Send node,
3750 ErroneousElement error,
3751 Node right,
3752 A arg) {
3753 apply(right, arg);
3754 return null;
3755 }
3756
3757 @override
3758 R errorInvalidNotEquals(
3759 Send node,
3760 ErroneousElement error,
3761 Node right,
3762 A arg) {
3763 apply(right, arg);
3764 return null;
3765 }
3766
3767 @override
3768 R errorInvalidBinary(
3769 Send node,
3770 ErroneousElement error,
3771 BinaryOperator operator,
3772 Node right,
3773 A arg) {
3774 apply(right, arg);
3775 return null;
3776 }
3777
3778 @override
3779 R errorInvalidIndex(
3780 Send node,
3781 ErroneousElement error,
3782 Node index,
3783 A arg) {
3784 apply(index, arg);
3785 return null;
3786 }
3787
3788 @override
3789 R errorInvalidIndexSet(
3790 Send node,
3791 ErroneousElement error,
3792 Node index,
3793 Node rhs,
3794 A arg) {
3795 apply(index, arg);
3796 apply(rhs, arg);
3797 return null;
3798 }
3799
3800 @override
3801 R errorInvalidCompoundIndexSet(
3802 Send node,
3803 ErroneousElement error,
3804 Node index,
3805 AssignmentOperator operator,
3806 Node rhs,
3807 A arg) {
3808 apply(index, arg);
3809 apply(rhs, arg);
3810 return null;
3811 }
3812
3813 @override
3814 R errorInvalidIndexPrefix(
3815 Send node,
3816 ErroneousElement error,
3817 Node index,
3818 IncDecOperator operator,
3819 A arg) {
3820 apply(index, arg);
3821 return null;
3822 }
3823
3824 @override
3825 R errorInvalidIndexPostfix(
3826 Send node,
3827 ErroneousElement error,
3828 Node index,
3829 IncDecOperator operator,
3830 A arg) {
3831 apply(index, arg);
3832 return null;
3833 }
3834
3835 @override
3652 R visitClassTypeLiteralSet( 3836 R visitClassTypeLiteralSet(
3653 SendSet node, 3837 SendSet node,
3654 ConstantExpression constant, 3838 ConstantExpression constant,
3655 Node rhs, 3839 Node rhs,
3656 A arg) { 3840 A arg) {
3657 apply(rhs, arg); 3841 apply(rhs, arg);
3658 return null; 3842 return null;
3659 } 3843 }
3660 3844
3661 @override 3845 @override
(...skipping 7205 matching lines...) Expand 10 before | Expand all | Expand 10 after
10867 NewExpression node, 11051 NewExpression node,
10868 ConstructorElement constructor, 11052 ConstructorElement constructor,
10869 InterfaceType type, 11053 InterfaceType type,
10870 NodeList arguments, 11054 NodeList arguments,
10871 CallStructure callStructure, 11055 CallStructure callStructure,
10872 A arg) { 11056 A arg) {
10873 return handleConstructorInvoke( 11057 return handleConstructorInvoke(
10874 node, constructor, type, arguments, callStructure, arg); 11058 node, constructor, type, arguments, callStructure, arg);
10875 } 11059 }
10876 } 11060 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698