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

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

Issue 1842033004: Add *IndexSetIfNull methods to SemanticSendVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 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
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 library dart2js.semantics_visitor; 5 library dart2js.semantics_visitor;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../dart_types.dart'; 9 import '../dart_types.dart';
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 3163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3174 /// m(rhs) => dynamic += rhs; 3174 /// m(rhs) => dynamic += rhs;
3175 /// 3175 ///
3176 R visitDynamicTypeLiteralCompound( 3176 R visitDynamicTypeLiteralCompound(
3177 Send node, 3177 Send node,
3178 ConstantExpression constant, 3178 ConstantExpression constant,
3179 AssignmentOperator operator, 3179 AssignmentOperator operator,
3180 Node rhs, 3180 Node rhs,
3181 A arg); 3181 A arg);
3182 3182
3183 /// Compound index assignment of [rhs] with [operator] to [index] on the 3183 /// Compound index assignment of [rhs] with [operator] to [index] on the
3184 /// index operators of [receiver] whose getter and setter are defined by 3184 /// index operators of [receiver].
3185 /// [getterSelector] and [setterSelector], respectively.
3186 /// 3185 ///
3187 /// For instance: 3186 /// For instance:
3188 /// 3187 ///
3189 /// m(receiver, index, rhs) => receiver[index] += rhs; 3188 /// m(receiver, index, rhs) => receiver[index] += rhs;
3190 /// 3189 ///
3191 R visitCompoundIndexSet( 3190 R visitCompoundIndexSet(
3192 SendSet node, 3191 SendSet node,
3193 Node receiver, 3192 Node receiver,
3194 Node index, 3193 Node index,
3195 AssignmentOperator operator, 3194 AssignmentOperator operator,
(...skipping 16 matching lines...) Expand all
3212 R visitSuperCompoundIndexSet( 3211 R visitSuperCompoundIndexSet(
3213 SendSet node, 3212 SendSet node,
3214 MethodElement getter, 3213 MethodElement getter,
3215 MethodElement setter, 3214 MethodElement setter,
3216 Node index, 3215 Node index,
3217 AssignmentOperator operator, 3216 AssignmentOperator operator,
3218 Node rhs, 3217 Node rhs,
3219 A arg); 3218 A arg);
3220 3219
3221 /// Compound index assignment of [rhs] with [operator] to [index] on a super 3220 /// Compound index assignment of [rhs] with [operator] to [index] on a super
3222 /// super class where the index getter is undefined and the index setter is 3221 /// class where the index getter is undefined and the index setter is defined
3223 /// defined by [setter]. 3222 /// by [setter].
3224 /// 3223 ///
3225 /// For instance: 3224 /// For instance:
3226 /// 3225 ///
3227 /// class B { 3226 /// class B {
3228 /// } 3227 /// }
3229 /// class C extends B { 3228 /// class C extends B {
3230 /// m() => super[1] += 42; 3229 /// m() => super[1] += 42;
3231 /// } 3230 /// }
3232 /// 3231 ///
3233 R visitUnresolvedSuperGetterCompoundIndexSet( 3232 R visitUnresolvedSuperGetterCompoundIndexSet(
3234 Send node, 3233 Send node,
3235 Element element, 3234 Element element,
3236 MethodElement setter, 3235 MethodElement setter,
3237 Node index, 3236 Node index,
3238 AssignmentOperator operator, 3237 AssignmentOperator operator,
3239 Node rhs, 3238 Node rhs,
3240 A arg); 3239 A arg);
3241 3240
3242 /// Compound index assignment of [rhs] with [operator] to [index] on a super 3241 /// Compound index assignment of [rhs] with [operator] to [index] on a super
3243 /// super class where the index getter is defined by [getter] but the index 3242 /// class where the index getter is defined by [getter] but the index setter
3244 /// setter is undefined. 3243 /// is undefined.
3245 /// 3244 ///
3246 /// For instance: 3245 /// For instance:
3247 /// 3246 ///
3248 /// class B { 3247 /// class B {
3249 /// operator [](index) => 42; 3248 /// operator [](index) => 42;
3250 /// } 3249 /// }
3251 /// class C extends B { 3250 /// class C extends B {
3252 /// m() => super[1] += 42; 3251 /// m() => super[1] += 42;
3253 /// } 3252 /// }
3254 /// 3253 ///
3255 R visitUnresolvedSuperSetterCompoundIndexSet( 3254 R visitUnresolvedSuperSetterCompoundIndexSet(
3256 Send node, 3255 Send node,
3257 MethodElement getter, 3256 MethodElement getter,
3258 Element element, 3257 Element element,
3259 Node index, 3258 Node index,
3260 AssignmentOperator operator, 3259 AssignmentOperator operator,
3261 Node rhs, 3260 Node rhs,
3262 A arg); 3261 A arg);
3263 3262
3264 /// Compound index assignment of [rhs] with [operator] to [index] on a super 3263 /// Compound index assignment of [rhs] with [operator] to [index] on a super
3265 /// super class where the index getter and setter are undefined. 3264 /// class where the index getter and setter are undefined.
3266 /// 3265 ///
3267 /// For instance: 3266 /// For instance:
3268 /// 3267 ///
3269 /// class B { 3268 /// class B {
3270 /// } 3269 /// }
3271 /// class C extends B { 3270 /// class C extends B {
3272 /// m() => super[1] += 42; 3271 /// m() => super[1] += 42;
3273 /// } 3272 /// }
3274 /// 3273 ///
3275 R visitUnresolvedSuperCompoundIndexSet( 3274 R visitUnresolvedSuperCompoundIndexSet(
3276 Send node, 3275 Send node,
3277 Element element, 3276 Element element,
3278 Node index, 3277 Node index,
3279 AssignmentOperator operator, 3278 AssignmentOperator operator,
3280 Node rhs, 3279 Node rhs,
3281 A arg); 3280 A arg);
3282 3281
3282 /// If-null assignment expression of [rhs] to [index] on the index operators
3283 /// of [receiver].
3284 ///
3285 /// For instance:
3286 ///
3287 /// m(receiver, index, rhs) => receiver[index] ??= rhs;
3288 ///
3289 R visitIndexSetIfNull(
3290 SendSet node,
3291 Node receiver,
3292 Node index,
3293 Node rhs,
3294 A arg);
3295
3296 /// If-null assignment expression of [rhs] to [index] on the index operators
3297 /// of a super class defined by [getter] and [setter].
3298 ///
3299 /// For instance:
3300 ///
3301 /// class B {
3302 /// operator [](index) {}
3303 /// operator [](index, value) {}
3304 /// }
3305 /// class C extends B {
3306 /// m(index, rhs) => super[index] ??= rhs;
3307 /// }
3308 ///
3309 R visitSuperIndexSetIfNull(
3310 SendSet node,
3311 MethodElement getter,
3312 MethodElement setter,
3313 Node index,
3314 Node rhs,
3315 A arg);
3316
3317 /// If-null assignment expression of [rhs] to [index] on a super class where
3318 /// the index getter is undefined and the index setter is defined by [setter].
3319 ///
3320 /// For instance:
3321 ///
3322 /// class B {
3323 /// operator [](index, value) {}
3324 /// }
3325 /// class C extends B {
3326 /// m() => super[1] ??= 42;
3327 /// }
3328 ///
3329 R visitUnresolvedSuperGetterIndexSetIfNull(
3330 Send node,
3331 Element element,
3332 MethodElement setter,
3333 Node index,
3334 Node rhs,
3335 A arg);
3336
3337 /// If-null assignment expression of [rhs] to [index] on a super class where
3338 /// the index getter is defined by [getter] but the index setter is undefined.
3339 ///
3340 /// For instance:
3341 ///
3342 /// class B {
3343 /// operator [](index) => 42;
3344 /// }
3345 /// class C extends B {
3346 /// m() => super[1] ??= 42;
3347 /// }
3348 ///
3349 R visitUnresolvedSuperSetterIndexSetIfNull(
3350 Send node,
3351 MethodElement getter,
3352 Element element,
3353 Node index,
3354 Node rhs,
3355 A arg);
3356
3357 /// If-null assignment expression of [rhs] to [index] on a super class where
3358 /// the index getter and setter are undefined.
3359 ///
3360 /// For instance:
3361 ///
3362 /// class B {
3363 /// }
3364 /// class C extends B {
3365 /// m() => super[1] ??= 42;
3366 /// }
3367 ///
3368 R visitUnresolvedSuperIndexSetIfNull(
3369 Send node,
3370 Element element,
3371 Node index,
3372 Node rhs,
3373 A arg);
3374
3283 /// Prefix expression with [operator] of the property on [receiver] whose 3375 /// Prefix expression with [operator] of the property on [receiver] whose
3284 /// getter and setter are defined by [getterSelector] and [setterSelector], 3376 /// getter and setter are defined by [getterSelector] and [setterSelector],
3285 /// respectively. 3377 /// respectively.
3286 /// 3378 ///
3287 /// For instance: 3379 /// For instance:
3288 /// 3380 ///
3289 /// m(receiver) => ++receiver.foo; 3381 /// m(receiver) => ++receiver.foo;
3290 /// 3382 ///
3291 R visitDynamicPropertyPrefix( 3383 R visitDynamicPropertyPrefix(
3292 Send node, 3384 Send node,
(...skipping 1787 matching lines...) Expand 10 before | Expand all | Expand 10 after
5080 /// 5172 ///
5081 /// m() => p += 42; 5173 /// m() => p += 42;
5082 /// 5174 ///
5083 R errorInvalidCompound( 5175 R errorInvalidCompound(
5084 Send node, 5176 Send node,
5085 ErroneousElement error, 5177 ErroneousElement error,
5086 AssignmentOperator operator, 5178 AssignmentOperator operator,
5087 Node rhs, 5179 Node rhs,
5088 A arg); 5180 A arg);
5089 5181
5182 /// If-null assignment expression of [rhs] to [index] on the index operators
5183 /// of an invalid expression.
5184 ///
5185 /// For instance:
5186 ///
5187 /// import 'foo.dart' as p;
5188 ///
5189 /// m(index, rhs) => p[index] ??= rhs;
5190 ///
5191 R errorInvalidIndexSetIfNull(
5192 SendSet node,
5193 ErroneousElement error,
5194 Node index,
5195 Node rhs,
5196 A arg);
5197
5090 /// Unary operation with [operator] on an invalid expression. 5198 /// Unary operation with [operator] on an invalid expression.
5091 /// 5199 ///
5092 /// For instance: 5200 /// For instance:
5093 /// 5201 ///
5094 /// class C { 5202 /// class C {
5095 /// static m() => ~super; 5203 /// static m() => ~super;
5096 /// } 5204 /// }
5097 /// 5205 ///
5098 R errorInvalidUnary( 5206 R errorInvalidUnary(
5099 Send node, 5207 Send node,
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
5836 /// C() : this._(42); 5944 /// C() : this._(42);
5837 /// } 5945 /// }
5838 /// 5946 ///
5839 R errorUnresolvedThisConstructorInvoke( 5947 R errorUnresolvedThisConstructorInvoke(
5840 Send node, 5948 Send node,
5841 Element element, 5949 Element element,
5842 NodeList arguments, 5950 NodeList arguments,
5843 Selector selector, 5951 Selector selector,
5844 A arg); 5952 A arg);
5845 } 5953 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/members.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698