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