| OLD | NEW |
| 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 2632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2643 } | 2643 } |
| 2644 | 2644 |
| 2645 @override | 2645 @override |
| 2646 R visitUnresolvedSet( | 2646 R visitUnresolvedSet( |
| 2647 Send node, | 2647 Send node, |
| 2648 Element element, | 2648 Element element, |
| 2649 Node rhs, | 2649 Node rhs, |
| 2650 A arg) { | 2650 A arg) { |
| 2651 return bulkHandleSet(node, arg); | 2651 return bulkHandleSet(node, arg); |
| 2652 } | 2652 } |
| 2653 | |
| 2654 @override | |
| 2655 R visitUnresolvedSuperSet( | |
| 2656 Send node, | |
| 2657 Element element, | |
| 2658 Node rhs, | |
| 2659 A arg) { | |
| 2660 return bulkHandleSet(node, arg); | |
| 2661 } | |
| 2662 } | 2653 } |
| 2663 | 2654 |
| 2664 /// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor] | 2655 /// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor] |
| 2665 /// by delegating to a bulk handler. | 2656 /// by delegating to a bulk handler. |
| 2666 /// | 2657 /// |
| 2667 /// Use this mixin to provide a trivial implementation for all `visitXIndexSet` | 2658 /// Use this mixin to provide a trivial implementation for all `visitXIndexSet` |
| 2668 /// methods. | 2659 /// methods. |
| 2669 abstract class IndexSetBulkMixin<R, A> | 2660 abstract class IndexSetBulkMixin<R, A> |
| 2670 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { | 2661 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { |
| 2671 | 2662 |
| (...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3334 | 3325 |
| 3335 @override | 3326 @override |
| 3336 R visitUnresolvedSuperGet( | 3327 R visitUnresolvedSuperGet( |
| 3337 Send node, | 3328 Send node, |
| 3338 Element element, | 3329 Element element, |
| 3339 A arg) { | 3330 A arg) { |
| 3340 return bulkHandleSuper(node, arg); | 3331 return bulkHandleSuper(node, arg); |
| 3341 } | 3332 } |
| 3342 | 3333 |
| 3343 @override | 3334 @override |
| 3344 R visitUnresolvedSuperSet( | |
| 3345 Send node, | |
| 3346 Element element, | |
| 3347 Node rhs, | |
| 3348 A arg) { | |
| 3349 return bulkHandleSuper(node, arg); | |
| 3350 } | |
| 3351 | |
| 3352 @override | |
| 3353 R visitUnresolvedSuperInvoke( | 3335 R visitUnresolvedSuperInvoke( |
| 3354 Send node, | 3336 Send node, |
| 3355 Element function, | 3337 Element function, |
| 3356 NodeList arguments, | 3338 NodeList arguments, |
| 3357 Selector selector, | 3339 Selector selector, |
| 3358 A arg) { | 3340 A arg) { |
| 3359 return bulkHandleSuper(node, arg); | 3341 return bulkHandleSuper(node, arg); |
| 3360 } | 3342 } |
| 3361 | 3343 |
| 3362 @override | 3344 @override |
| (...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4509 | 4491 |
| 4510 @override | 4492 @override |
| 4511 R visitUnresolvedSuperGet( | 4493 R visitUnresolvedSuperGet( |
| 4512 Send node, | 4494 Send node, |
| 4513 Element element, | 4495 Element element, |
| 4514 A arg) { | 4496 A arg) { |
| 4515 return null; | 4497 return null; |
| 4516 } | 4498 } |
| 4517 | 4499 |
| 4518 @override | 4500 @override |
| 4519 R visitUnresolvedSuperSet( | |
| 4520 Send node, | |
| 4521 Element element, | |
| 4522 Node rhs, | |
| 4523 A arg) { | |
| 4524 apply(rhs, arg); | |
| 4525 return null; | |
| 4526 } | |
| 4527 | |
| 4528 @override | |
| 4529 R visitUnresolvedSuperInvoke( | 4501 R visitUnresolvedSuperInvoke( |
| 4530 Send node, | 4502 Send node, |
| 4531 Element function, | 4503 Element function, |
| 4532 NodeList arguments, | 4504 NodeList arguments, |
| 4533 Selector selector, | 4505 Selector selector, |
| 4534 A arg) { | 4506 A arg) { |
| 4535 apply(arguments, arg); | 4507 apply(arguments, arg); |
| 4536 return null; | 4508 return null; |
| 4537 } | 4509 } |
| 4538 | 4510 |
| (...skipping 7845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12384 NewExpression node, | 12356 NewExpression node, |
| 12385 ConstructorElement constructor, | 12357 ConstructorElement constructor, |
| 12386 InterfaceType type, | 12358 InterfaceType type, |
| 12387 NodeList arguments, | 12359 NodeList arguments, |
| 12388 CallStructure callStructure, | 12360 CallStructure callStructure, |
| 12389 A arg) { | 12361 A arg) { |
| 12390 return handleConstructorInvoke( | 12362 return handleConstructorInvoke( |
| 12391 node, constructor, type, arguments, callStructure, arg); | 12363 node, constructor, type, arguments, callStructure, arg); |
| 12392 } | 12364 } |
| 12393 } | 12365 } |
| OLD | NEW |