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 '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/operators.dart'; | 10 import '../elements/operators.dart'; |
11 import '../elements/resolution_types.dart'; | 11 import '../elements/resolution_types.dart'; |
12 import '../resolution/tree_elements.dart' show TreeElements; | 12 import '../resolution/tree_elements.dart' show TreeElements; |
13 import '../tree/tree.dart'; | 13 import '../tree/tree.dart'; |
14 import '../universe/call_structure.dart' show CallStructure; | 14 import '../universe/call_structure.dart' show CallStructure; |
15 import '../universe/selector.dart' show Selector; | 15 import '../universe/selector.dart' show Selector; |
16 import 'access_semantics.dart'; | 16 import 'access_semantics.dart'; |
17 import 'semantic_visitor.dart'; | 17 import 'semantic_visitor.dart'; |
18 | 18 |
19 /// Interface for the structure of the semantics of a [Send] or [NewExpression] | 19 /// Interface for the structure of the semantics of a [Send] or [NewExpression] |
20 /// node. | 20 /// node. |
21 abstract class SemanticSendStructure<R, A> { | 21 abstract class SemanticSendStructure<R, A> { |
22 /// Calls the matching visit method on [visitor] with [node] and [arg]. | 22 /// Calls the matching visit method on [visitor] with [node] and [arg]. |
23 R dispatch(SemanticSendVisitor<R, A> visitor, Node node, A arg); | 23 R dispatch(SemanticSendVisitor<R, A> visitor, covariant Node node, A arg); |
24 } | 24 } |
25 | 25 |
26 enum SendStructureKind { | 26 enum SendStructureKind { |
27 IF_NULL, | 27 IF_NULL, |
28 LOGICAL_AND, | 28 LOGICAL_AND, |
29 LOGICAL_OR, | 29 LOGICAL_OR, |
30 IS, | 30 IS, |
31 IS_NOT, | 31 IS_NOT, |
32 AS, | 32 AS, |
33 INVOKE, | 33 INVOKE, |
(...skipping 2481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2515 ThisConstructorInvokeStructure( | 2515 ThisConstructorInvokeStructure( |
2516 this.node, this.constructor, this.callStructure); | 2516 this.node, this.constructor, this.callStructure); |
2517 | 2517 |
2518 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { | 2518 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { |
2519 return visitor.visitThisConstructorInvoke( | 2519 return visitor.visitThisConstructorInvoke( |
2520 node, constructor, node.argumentsNode, callStructure, arg); | 2520 node, constructor, node.argumentsNode, callStructure, arg); |
2521 } | 2521 } |
2522 | 2522 |
2523 bool get isConstructorInvoke => true; | 2523 bool get isConstructorInvoke => true; |
2524 } | 2524 } |
OLD | NEW |