| 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 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1497 | 1497 |
| 1498 /// The structure for a [Send] that is a if-null assignment on the index | 1498 /// The structure for a [Send] that is a if-null assignment on the index |
| 1499 /// operator. For instance `a[b] ??= c`. | 1499 /// operator. For instance `a[b] ??= c`. |
| 1500 class IndexSetIfNullStructure<R, A> implements SendStructure<R, A> { | 1500 class IndexSetIfNullStructure<R, A> implements SendStructure<R, A> { |
| 1501 /// The target of the index operations. | 1501 /// The target of the index operations. |
| 1502 final AccessSemantics semantics; | 1502 final AccessSemantics semantics; |
| 1503 | 1503 |
| 1504 IndexSetIfNullStructure(this.semantics); | 1504 IndexSetIfNullStructure(this.semantics); |
| 1505 | 1505 |
| 1506 @override | 1506 @override |
| 1507 SendStructureKind get kind => SendStructureKind.INDEX_SET; | 1507 SendStructureKind get kind => SendStructureKind.INDEX_SET_IF_NULL; |
| 1508 | 1508 |
| 1509 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { | 1509 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { |
| 1510 switch (semantics.kind) { | 1510 switch (semantics.kind) { |
| 1511 case AccessKind.EXPRESSION: | 1511 case AccessKind.EXPRESSION: |
| 1512 return visitor.visitIndexSetIfNull(node, node.receiver, | 1512 return visitor.visitIndexSetIfNull(node, node.receiver, |
| 1513 node.arguments.first, node.arguments.tail.head, arg); | 1513 node.arguments.first, node.arguments.tail.head, arg); |
| 1514 case AccessKind.UNRESOLVED_SUPER: | 1514 case AccessKind.UNRESOLVED_SUPER: |
| 1515 return visitor.visitUnresolvedSuperIndexSetIfNull( | 1515 return visitor.visitUnresolvedSuperIndexSetIfNull( |
| 1516 node, | 1516 node, |
| 1517 semantics.element, | 1517 semantics.element, |
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2510 ThisConstructorInvokeStructure( | 2510 ThisConstructorInvokeStructure( |
| 2511 this.node, this.constructor, this.callStructure); | 2511 this.node, this.constructor, this.callStructure); |
| 2512 | 2512 |
| 2513 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { | 2513 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { |
| 2514 return visitor.visitThisConstructorInvoke( | 2514 return visitor.visitThisConstructorInvoke( |
| 2515 node, constructor, node.argumentsNode, callStructure, arg); | 2515 node, constructor, node.argumentsNode, callStructure, arg); |
| 2516 } | 2516 } |
| 2517 | 2517 |
| 2518 bool get isConstructorInvoke => true; | 2518 bool get isConstructorInvoke => true; |
| 2519 } | 2519 } |
| OLD | NEW |