| 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 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2471   } | 2471   } | 
| 2472 | 2472 | 
| 2473   @override | 2473   @override | 
| 2474   R visitLogicalOr( | 2474   R visitLogicalOr( | 
| 2475       Send node, | 2475       Send node, | 
| 2476       Node left, | 2476       Node left, | 
| 2477       Node right, | 2477       Node right, | 
| 2478       A arg) { | 2478       A arg) { | 
| 2479     return bulkHandleNode(node, 'Lazy or `#` unhandled.', arg); | 2479     return bulkHandleNode(node, 'Lazy or `#` unhandled.', arg); | 
| 2480   } | 2480   } | 
|  | 2481 | 
|  | 2482   @override | 
|  | 2483   void previsitDeferredAccess( | 
|  | 2484       Send node, | 
|  | 2485       PrefixElement prefix, | 
|  | 2486       A arg) { | 
|  | 2487     bulkHandleNode(node, 'Deferred access `#` unhandled.', arg); | 
|  | 2488   } | 
| 2481 } | 2489 } | 
| 2482 | 2490 | 
| 2483 /// Mixin that implements all visitor methods for `super` calls in | 2491 /// Mixin that implements all visitor methods for `super` calls in | 
| 2484 /// [SemanticSendVisitor] by delegating to a bulk handler. | 2492 /// [SemanticSendVisitor] by delegating to a bulk handler. | 
| 2485 /// | 2493 /// | 
| 2486 /// Use this mixin to provide a trivial implementation for `super` calls | 2494 /// Use this mixin to provide a trivial implementation for `super` calls | 
| 2487 /// visitor methods. | 2495 /// visitor methods. | 
| 2488 abstract class SuperBulkMixin<R, A> | 2496 abstract class SuperBulkMixin<R, A> | 
| 2489     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { | 2497     implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { | 
| 2490 | 2498 | 
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3503 | 3511 | 
| 3504 | 3512 | 
| 3505 /// [SemanticSendVisitor] that visits subnodes. | 3513 /// [SemanticSendVisitor] that visits subnodes. | 
| 3506 class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { | 3514 class TraversalSendMixin<R, A> implements SemanticSendVisitor<R, A> { | 
| 3507   @override | 3515   @override | 
| 3508   R apply(Node node, A arg) { | 3516   R apply(Node node, A arg) { | 
| 3509     throw new UnimplementedError("TraversalMixin.apply unimplemented"); | 3517     throw new UnimplementedError("TraversalMixin.apply unimplemented"); | 
| 3510   } | 3518   } | 
| 3511 | 3519 | 
| 3512   @override | 3520   @override | 
|  | 3521   void previsitDeferredAccess( | 
|  | 3522       Send node, | 
|  | 3523       PrefixElement prefix, | 
|  | 3524       A arg) { | 
|  | 3525   } | 
|  | 3526 | 
|  | 3527   @override | 
| 3513   R errorInvalidAssert( | 3528   R errorInvalidAssert( | 
| 3514       Send node, | 3529       Send node, | 
| 3515       NodeList arguments, | 3530       NodeList arguments, | 
| 3516       A arg) { | 3531       A arg) { | 
| 3517     apply(arguments, arg); | 3532     apply(arguments, arg); | 
| 3518     return null; | 3533     return null; | 
| 3519   } | 3534   } | 
| 3520 | 3535 | 
| 3521   @override | 3536   @override | 
| 3522   R visitClassTypeLiteralSet( | 3537   R visitClassTypeLiteralSet( | 
| (...skipping 7214 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 10737       NewExpression node, | 10752       NewExpression node, | 
| 10738       ConstructorElement constructor, | 10753       ConstructorElement constructor, | 
| 10739       InterfaceType type, | 10754       InterfaceType type, | 
| 10740       NodeList arguments, | 10755       NodeList arguments, | 
| 10741       CallStructure callStructure, | 10756       CallStructure callStructure, | 
| 10742       A arg) { | 10757       A arg) { | 
| 10743     return handleConstructorInvoke( | 10758     return handleConstructorInvoke( | 
| 10744         node, constructor, type, arguments, callStructure, arg); | 10759         node, constructor, type, arguments, callStructure, arg); | 
| 10745   } | 10760   } | 
| 10746 } | 10761 } | 
| OLD | NEW | 
|---|