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 library dart2js.resolution.send_structure; | 5 library dart2js.resolution.send_structure; |
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 '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2052 @override | 2052 @override |
2053 SendStructureKind get kind => SendStructureKind.DEFERRED_PREFIX; | 2053 SendStructureKind get kind => SendStructureKind.DEFERRED_PREFIX; |
2054 | 2054 |
2055 @override | 2055 @override |
2056 R dispatch(SemanticSendVisitor<R, A> visitor, Send send, A arg) { | 2056 R dispatch(SemanticSendVisitor<R, A> visitor, Send send, A arg) { |
2057 visitor.previsitDeferredAccess(send, prefix, arg); | 2057 visitor.previsitDeferredAccess(send, prefix, arg); |
2058 return sendStructure.dispatch(visitor, send, arg); | 2058 return sendStructure.dispatch(visitor, send, arg); |
2059 } | 2059 } |
2060 } | 2060 } |
2061 | 2061 |
2062 enum NewStructureKind { NEW_INVOKE, CONST_INVOKE, LATE_CONST, } | 2062 enum NewStructureKind { |
| 2063 NEW_INVOKE, |
| 2064 CONST_INVOKE, |
| 2065 LATE_CONST, |
| 2066 } |
2063 | 2067 |
2064 /// The structure for a [NewExpression] of a new invocation. | 2068 /// The structure for a [NewExpression] of a new invocation. |
2065 abstract class NewStructure<R, A> implements SemanticSendStructure<R, A> { | 2069 abstract class NewStructure<R, A> implements SemanticSendStructure<R, A> { |
2066 /// Calls the matching visit method on [visitor] with [node] and [arg]. | 2070 /// Calls the matching visit method on [visitor] with [node] and [arg]. |
2067 R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg); | 2071 R dispatch(SemanticSendVisitor<R, A> visitor, NewExpression node, A arg); |
2068 | 2072 |
2069 NewStructureKind get kind; | 2073 NewStructureKind get kind; |
2070 } | 2074 } |
2071 | 2075 |
2072 /// The structure for a [NewExpression] of a new invocation. For instance | 2076 /// The structure for a [NewExpression] of a new invocation. For instance |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2509 ThisConstructorInvokeStructure( | 2513 ThisConstructorInvokeStructure( |
2510 this.node, this.constructor, this.callStructure); | 2514 this.node, this.constructor, this.callStructure); |
2511 | 2515 |
2512 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { | 2516 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { |
2513 return visitor.visitThisConstructorInvoke( | 2517 return visitor.visitThisConstructorInvoke( |
2514 node, constructor, node.argumentsNode, callStructure, arg); | 2518 node, constructor, node.argumentsNode, callStructure, arg); |
2515 } | 2519 } |
2516 | 2520 |
2517 bool get isConstructorInvoke => true; | 2521 bool get isConstructorInvoke => true; |
2518 } | 2522 } |
OLD | NEW |