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.send_structure; | 5 library dart2js.send_structure; |
6 | 6 |
7 import 'access_semantics.dart'; | 7 import 'access_semantics.dart'; |
8 import 'operators.dart'; | 8 import 'operators.dart'; |
9 import 'semantic_visitor.dart'; | 9 import 'semantic_visitor.dart'; |
10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 node.argumentsNode, | 416 node.argumentsNode, |
417 callStructure, | 417 callStructure, |
418 arg); | 418 arg); |
419 case AccessKind.TOPLEVEL_METHOD: | 419 case AccessKind.TOPLEVEL_METHOD: |
420 return visitor.visitTopLevelFunctionIncompatibleInvoke( | 420 return visitor.visitTopLevelFunctionIncompatibleInvoke( |
421 node, | 421 node, |
422 semantics.element, | 422 semantics.element, |
423 node.argumentsNode, | 423 node.argumentsNode, |
424 callStructure, | 424 callStructure, |
425 arg); | 425 arg); |
| 426 case AccessKind.LOCAL_FUNCTION: |
| 427 return visitor.visitLocalFunctionIncompatibleInvoke( |
| 428 node, |
| 429 semantics.element, |
| 430 node.argumentsNode, |
| 431 callStructure, |
| 432 arg); |
426 default: | 433 default: |
427 // TODO(johnniwinther): Support more variants of this invoke structure. | 434 // TODO(johnniwinther): Support more variants of this invoke structure. |
428 break; | 435 break; |
429 } | 436 } |
430 throw new SpannableAssertionFailure( | 437 throw new SpannableAssertionFailure( |
431 node, "Invalid incompatible invoke: ${semantics}"); | 438 node, "Invalid incompatible invoke: ${semantics}"); |
432 } | 439 } |
433 | 440 |
434 String toString() => 'incompatible-invoke($selector, $semantics)'; | 441 String toString() => 'incompatible-invoke($selector, $semantics)'; |
435 } | 442 } |
(...skipping 2193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2629 ThisConstructorInvokeStructure( | 2636 ThisConstructorInvokeStructure( |
2630 this.node, this.constructor, this.callStructure); | 2637 this.node, this.constructor, this.callStructure); |
2631 | 2638 |
2632 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { | 2639 R dispatch(SemanticDeclarationVisitor<R, A> visitor, A arg) { |
2633 return visitor.visitThisConstructorInvoke( | 2640 return visitor.visitThisConstructorInvoke( |
2634 node, constructor, node.argumentsNode, callStructure, arg); | 2641 node, constructor, node.argumentsNode, callStructure, arg); |
2635 } | 2642 } |
2636 | 2643 |
2637 bool get isConstructorInvoke => true; | 2644 bool get isConstructorInvoke => true; |
2638 } | 2645 } |
OLD | NEW |