Chromium Code Reviews| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 332 node.argumentsNode, | 332 node.argumentsNode, |
| 333 callStructure, | 333 callStructure, |
| 334 arg); | 334 arg); |
| 335 case AccessKind.UNRESOLVED: | 335 case AccessKind.UNRESOLVED: |
| 336 return visitor.errorUnresolvedInvoke( | 336 return visitor.errorUnresolvedInvoke( |
| 337 node, | 337 node, |
| 338 semantics.element, | 338 semantics.element, |
| 339 node.argumentsNode, | 339 node.argumentsNode, |
| 340 selector, | 340 selector, |
| 341 arg); | 341 arg); |
| 342 case AccessKind.UNRESOLVED_SUPER: | |
| 343 return visitor.visitUnresolvedSuperInvoke( | |
| 344 node, | |
| 345 semantics.element, | |
| 346 node.argumentsNode, | |
| 347 selector, | |
| 348 arg); | |
| 342 case AccessKind.COMPOUND: | 349 case AccessKind.COMPOUND: |
| 343 // This is not a valid case. | 350 // This is not a valid case. |
| 344 break; | 351 break; |
| 345 } | 352 } |
| 346 throw new SpannableAssertionFailure(node, "Invalid invoke: ${semantics}"); | 353 throw new SpannableAssertionFailure(node, "Invalid invoke: ${semantics}"); |
| 347 } | 354 } |
| 348 | 355 |
| 349 String toString() => 'invoke($selector,$semantics)'; | 356 String toString() => 'invoke($selector,$semantics)'; |
| 350 } | 357 } |
| 351 | 358 |
| 359 /// The structure for a [Send] that is an incompatible invocation, i.e. an | |
| 360 /// invocation of a known target where the call structure does not match. | |
| 361 class IncompatibleInvokeStructure<R, A> implements SendStructure<R, A> { | |
| 362 /// The target of the invocation. | |
| 363 final AccessSemantics semantics; | |
| 364 | |
| 365 /// The [Selector] for the invocation. | |
| 366 // TODO(johnniwinther): Store this only for dynamic invocations. | |
| 367 final Selector selector; | |
| 368 | |
| 369 /// The [CallStructure] of the invocation. | |
| 370 // TODO(johnniwinther): Store this directly for static invocations. | |
| 371 CallStructure get callStructure => selector.callStructure; | |
| 372 | |
| 373 IncompatibleInvokeStructure(this.semantics, this.selector); | |
| 374 | |
| 375 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { | |
| 376 switch (semantics.kind) { | |
| 377 case AccessKind.SUPER_METHOD: | |
| 378 return visitor.visitSuperMethodIncompatibleInvoke( | |
| 379 node, | |
| 380 semantics.element, | |
| 381 node.argumentsNode, | |
| 382 callStructure, | |
| 383 arg); | |
| 384 default: | |
| 385 // TODO(johnniwinther): Support more variant of this invoke structure. | |
|
karlklose
2015/04/27 14:01:55
'variant' -> 'variants'.
Johnni Winther
2015/04/28 08:18:28
Done.
| |
| 386 break; | |
| 387 } | |
| 388 throw new SpannableAssertionFailure( | |
| 389 node, "Invalid incompatible invoke: ${semantics}"); | |
| 390 } | |
| 391 | |
| 392 String toString() => 'invoke($selector,$semantics)'; | |
|
karlklose
2015/04/27 14:01:55
Space after ',
?
Johnni Winther
2015/04/28 08:18:28
Done.
| |
| 393 } | |
| 394 | |
| 352 /// The structure for a [Send] that is a read access. | 395 /// The structure for a [Send] that is a read access. |
| 353 class GetStructure<R, A> implements SendStructure<R, A> { | 396 class GetStructure<R, A> implements SendStructure<R, A> { |
| 354 /// The target of the read access. | 397 /// The target of the read access. |
| 355 final AccessSemantics semantics; | 398 final AccessSemantics semantics; |
| 356 | 399 |
| 357 /// The [Selector] for the getter invocation. | 400 /// The [Selector] for the getter invocation. |
| 358 final Selector selector; | 401 final Selector selector; |
| 359 | 402 |
| 360 GetStructure(this.semantics, this.selector); | 403 GetStructure(this.semantics, this.selector); |
| 361 | 404 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 case AccessKind.CONSTANT: | 519 case AccessKind.CONSTANT: |
| 477 return visitor.visitConstantGet( | 520 return visitor.visitConstantGet( |
| 478 node, | 521 node, |
| 479 semantics.constant, | 522 semantics.constant, |
| 480 arg); | 523 arg); |
| 481 case AccessKind.UNRESOLVED: | 524 case AccessKind.UNRESOLVED: |
| 482 return visitor.errorUnresolvedGet( | 525 return visitor.errorUnresolvedGet( |
| 483 node, | 526 node, |
| 484 semantics.element, | 527 semantics.element, |
| 485 arg); | 528 arg); |
| 529 case AccessKind.UNRESOLVED_SUPER: | |
| 530 return visitor.visitUnresolvedSuperGet( | |
| 531 node, | |
| 532 semantics.element, | |
| 533 arg); | |
| 486 case AccessKind.COMPOUND: | 534 case AccessKind.COMPOUND: |
| 487 // This is not a valid case. | 535 // This is not a valid case. |
| 488 break; | 536 break; |
| 489 } | 537 } |
| 490 throw new SpannableAssertionFailure(node, "Invalid getter: ${semantics}"); | 538 throw new SpannableAssertionFailure(node, "Invalid getter: ${semantics}"); |
| 491 } | 539 } |
| 492 | 540 |
| 493 String toString() => 'get($selector,$semantics)'; | 541 String toString() => 'get($selector,$semantics)'; |
| 494 } | 542 } |
| 495 | 543 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 634 arg); | 682 arg); |
| 635 case AccessKind.SUPER_SETTER: | 683 case AccessKind.SUPER_SETTER: |
| 636 return visitor.visitSuperSetterSet( | 684 return visitor.visitSuperSetterSet( |
| 637 node, | 685 node, |
| 638 semantics.element, | 686 semantics.element, |
| 639 node.arguments.single, | 687 node.arguments.single, |
| 640 arg); | 688 arg); |
| 641 case AccessKind.CONSTANT: | 689 case AccessKind.CONSTANT: |
| 642 // TODO(johnniwinther): Should this be a valid case? | 690 // TODO(johnniwinther): Should this be a valid case? |
| 643 break; | 691 break; |
| 692 case AccessKind.UNRESOLVED_SUPER: | |
| 693 // TODO(johnniwinther): Handle this separately. | |
| 644 case AccessKind.UNRESOLVED: | 694 case AccessKind.UNRESOLVED: |
| 645 return visitor.errorUnresolvedSet( | 695 return visitor.errorUnresolvedSet( |
| 646 node, | 696 node, |
| 647 semantics.element, | 697 semantics.element, |
| 648 node.arguments.single, | 698 node.arguments.single, |
| 649 arg); | 699 arg); |
| 700 break; | |
| 650 case AccessKind.COMPOUND: | 701 case AccessKind.COMPOUND: |
| 651 // This is not a valid case. | 702 // This is not a valid case. |
| 652 break; | 703 break; |
| 653 } | 704 } |
| 654 throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}"); | 705 throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}"); |
| 655 } | 706 } |
| 656 | 707 |
| 657 String toString() => 'set($selector,$semantics)'; | 708 String toString() => 'set($selector,$semantics)'; |
| 658 } | 709 } |
| 659 | 710 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 706 node, | 757 node, |
| 707 operator, | 758 operator, |
| 708 node.receiver, | 759 node.receiver, |
| 709 arg); | 760 arg); |
| 710 case AccessKind.SUPER_METHOD: | 761 case AccessKind.SUPER_METHOD: |
| 711 return visitor.visitSuperUnary( | 762 return visitor.visitSuperUnary( |
| 712 node, | 763 node, |
| 713 operator, | 764 operator, |
| 714 semantics.element, | 765 semantics.element, |
| 715 arg); | 766 arg); |
| 716 case AccessKind.UNRESOLVED: | 767 case AccessKind.UNRESOLVED_SUPER: |
| 717 return visitor.errorUnresolvedSuperUnary( | 768 return visitor.visitUnresolvedSuperUnary( |
| 718 node, | 769 node, |
| 719 operator, | 770 operator, |
| 720 semantics.element, | 771 semantics.element, |
| 721 arg); | 772 arg); |
| 722 default: | 773 default: |
| 723 // This is not a valid case. | 774 // This is not a valid case. |
| 724 break; | 775 break; |
| 725 } | 776 } |
| 726 throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}"); | 777 throw new SpannableAssertionFailure(node, "Invalid setter: ${semantics}"); |
| 727 } | 778 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 765 node, | 816 node, |
| 766 node.receiver, | 817 node.receiver, |
| 767 node.arguments.single, | 818 node.arguments.single, |
| 768 arg); | 819 arg); |
| 769 case AccessKind.SUPER_METHOD: | 820 case AccessKind.SUPER_METHOD: |
| 770 return visitor.visitSuperIndex( | 821 return visitor.visitSuperIndex( |
| 771 node, | 822 node, |
| 772 semantics.element, | 823 semantics.element, |
| 773 node.arguments.single, | 824 node.arguments.single, |
| 774 arg); | 825 arg); |
| 775 case AccessKind.UNRESOLVED: | 826 case AccessKind.UNRESOLVED_SUPER: |
| 776 return visitor.errorUnresolvedSuperIndex( | 827 return visitor.visitUnresolvedSuperIndex( |
| 777 node, | 828 node, |
| 778 semantics.element, | 829 semantics.element, |
| 779 node.arguments.single, | 830 node.arguments.single, |
| 780 arg); | 831 arg); |
| 781 default: | 832 default: |
| 782 // This is not a valid case. | 833 // This is not a valid case. |
| 783 break; | 834 break; |
| 784 } | 835 } |
| 785 throw new SpannableAssertionFailure(node, "Invalid index: ${semantics}"); | 836 throw new SpannableAssertionFailure(node, "Invalid index: ${semantics}"); |
| 786 } | 837 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 883 operator, | 934 operator, |
| 884 node.arguments.single, | 935 node.arguments.single, |
| 885 arg); | 936 arg); |
| 886 case AccessKind.SUPER_METHOD: | 937 case AccessKind.SUPER_METHOD: |
| 887 return visitor.visitSuperBinary( | 938 return visitor.visitSuperBinary( |
| 888 node, | 939 node, |
| 889 semantics.element, | 940 semantics.element, |
| 890 operator, | 941 operator, |
| 891 node.arguments.single, | 942 node.arguments.single, |
| 892 arg); | 943 arg); |
| 893 case AccessKind.UNRESOLVED: | 944 case AccessKind.UNRESOLVED_SUPER: |
| 894 return visitor.errorUnresolvedSuperBinary( | 945 return visitor.visitUnresolvedSuperBinary( |
| 895 node, | 946 node, |
| 896 semantics.element, | 947 semantics.element, |
| 897 operator, | 948 operator, |
| 898 node.arguments.single, | 949 node.arguments.single, |
| 899 arg); | 950 arg); |
| 900 default: | 951 default: |
| 901 // This is not a valid case. | 952 // This is not a valid case. |
| 902 break; | 953 break; |
| 903 } | 954 } |
| 904 throw new SpannableAssertionFailure( | 955 throw new SpannableAssertionFailure( |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 946 node.arguments.first, | 997 node.arguments.first, |
| 947 node.arguments.tail.head, | 998 node.arguments.tail.head, |
| 948 arg); | 999 arg); |
| 949 case AccessKind.SUPER_METHOD: | 1000 case AccessKind.SUPER_METHOD: |
| 950 return visitor.visitSuperIndexSet( | 1001 return visitor.visitSuperIndexSet( |
| 951 node, | 1002 node, |
| 952 semantics.element, | 1003 semantics.element, |
| 953 node.arguments.first, | 1004 node.arguments.first, |
| 954 node.arguments.tail.head, | 1005 node.arguments.tail.head, |
| 955 arg); | 1006 arg); |
| 1007 case AccessKind.UNRESOLVED_SUPER: | |
| 956 case AccessKind.UNRESOLVED: | 1008 case AccessKind.UNRESOLVED: |
| 1009 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 957 return visitor.errorUnresolvedSuperIndexSet( | 1010 return visitor.errorUnresolvedSuperIndexSet( |
| 958 node, | 1011 node, |
| 959 semantics.element, | 1012 semantics.element, |
| 960 node.arguments.first, | 1013 node.arguments.first, |
| 961 node.arguments.tail.head, | 1014 node.arguments.tail.head, |
| 962 arg); | 1015 arg); |
| 963 default: | 1016 default: |
| 964 // This is not a valid case. | 1017 // This is not a valid case. |
| 965 break; | 1018 break; |
| 966 } | 1019 } |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 995 | 1048 |
| 996 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { | 1049 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { |
| 997 switch (semantics.kind) { | 1050 switch (semantics.kind) { |
| 998 case AccessKind.DYNAMIC_PROPERTY: | 1051 case AccessKind.DYNAMIC_PROPERTY: |
| 999 return visitor.visitIndexPrefix( | 1052 return visitor.visitIndexPrefix( |
| 1000 node, | 1053 node, |
| 1001 node.receiver, | 1054 node.receiver, |
| 1002 node.arguments.single, | 1055 node.arguments.single, |
| 1003 operator, | 1056 operator, |
| 1004 arg); | 1057 arg); |
| 1058 case AccessKind.UNRESOLVED_SUPER: | |
| 1005 case AccessKind.UNRESOLVED: | 1059 case AccessKind.UNRESOLVED: |
| 1060 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1006 return visitor.errorUnresolvedSuperIndexPrefix( | 1061 return visitor.errorUnresolvedSuperIndexPrefix( |
| 1007 node, | 1062 node, |
| 1008 semantics.element, | 1063 semantics.element, |
| 1009 node.arguments.single, | 1064 node.arguments.single, |
| 1010 operator, | 1065 operator, |
| 1011 arg); | 1066 arg); |
| 1012 case AccessKind.COMPOUND: | 1067 case AccessKind.COMPOUND: |
| 1013 CompoundAccessSemantics compoundSemantics = semantics; | 1068 CompoundAccessSemantics compoundSemantics = semantics; |
| 1014 switch (compoundSemantics.compoundAccessKind) { | 1069 switch (compoundSemantics.compoundAccessKind) { |
| 1015 case CompoundAccessKind.SUPER_GETTER_SETTER: | 1070 case CompoundAccessKind.SUPER_GETTER_SETTER: |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1058 | 1113 |
| 1059 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { | 1114 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { |
| 1060 switch (semantics.kind) { | 1115 switch (semantics.kind) { |
| 1061 case AccessKind.DYNAMIC_PROPERTY: | 1116 case AccessKind.DYNAMIC_PROPERTY: |
| 1062 return visitor.visitIndexPostfix( | 1117 return visitor.visitIndexPostfix( |
| 1063 node, | 1118 node, |
| 1064 node.receiver, | 1119 node.receiver, |
| 1065 node.arguments.single, | 1120 node.arguments.single, |
| 1066 operator, | 1121 operator, |
| 1067 arg); | 1122 arg); |
| 1123 case AccessKind.UNRESOLVED_SUPER: | |
| 1068 case AccessKind.UNRESOLVED: | 1124 case AccessKind.UNRESOLVED: |
| 1125 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1069 return visitor.errorUnresolvedSuperIndexPostfix( | 1126 return visitor.errorUnresolvedSuperIndexPostfix( |
| 1070 node, | 1127 node, |
| 1071 semantics.element, | 1128 semantics.element, |
| 1072 node.arguments.single, | 1129 node.arguments.single, |
| 1073 operator, | 1130 operator, |
| 1074 arg); | 1131 arg); |
| 1075 case AccessKind.COMPOUND: | 1132 case AccessKind.COMPOUND: |
| 1076 CompoundAccessSemantics compoundSemantics = semantics; | 1133 CompoundAccessSemantics compoundSemantics = semantics; |
| 1077 switch (compoundSemantics.compoundAccessKind) { | 1134 switch (compoundSemantics.compoundAccessKind) { |
| 1078 case CompoundAccessKind.SUPER_GETTER_SETTER: | 1135 case CompoundAccessKind.SUPER_GETTER_SETTER: |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1235 break; | 1292 break; |
| 1236 case AccessKind.SUPER_GETTER: | 1293 case AccessKind.SUPER_GETTER: |
| 1237 // This is not a valid case. | 1294 // This is not a valid case. |
| 1238 break; | 1295 break; |
| 1239 case AccessKind.SUPER_SETTER: | 1296 case AccessKind.SUPER_SETTER: |
| 1240 // This is not a valid case. | 1297 // This is not a valid case. |
| 1241 break; | 1298 break; |
| 1242 case AccessKind.CONSTANT: | 1299 case AccessKind.CONSTANT: |
| 1243 // TODO(johnniwinther): Should this be a valid case? | 1300 // TODO(johnniwinther): Should this be a valid case? |
| 1244 break; | 1301 break; |
| 1302 case AccessKind.UNRESOLVED_SUPER: | |
| 1245 case AccessKind.UNRESOLVED: | 1303 case AccessKind.UNRESOLVED: |
| 1304 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1246 return visitor.errorUnresolvedCompound( | 1305 return visitor.errorUnresolvedCompound( |
| 1247 node, | 1306 node, |
| 1248 semantics.element, | 1307 semantics.element, |
| 1249 operator, | 1308 operator, |
| 1250 node.arguments.single, | 1309 node.arguments.single, |
| 1251 arg); | 1310 arg); |
| 1252 case AccessKind.COMPOUND: | 1311 case AccessKind.COMPOUND: |
| 1253 CompoundAccessSemantics compoundSemantics = semantics; | 1312 CompoundAccessSemantics compoundSemantics = semantics; |
| 1254 switch (compoundSemantics.compoundAccessKind) { | 1313 switch (compoundSemantics.compoundAccessKind) { |
| 1255 case CompoundAccessKind.STATIC_GETTER_SETTER: | 1314 case CompoundAccessKind.STATIC_GETTER_SETTER: |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1351 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { | 1410 R dispatch(SemanticSendVisitor<R, A> visitor, Send node, A arg) { |
| 1352 switch (semantics.kind) { | 1411 switch (semantics.kind) { |
| 1353 case AccessKind.DYNAMIC_PROPERTY: | 1412 case AccessKind.DYNAMIC_PROPERTY: |
| 1354 return visitor.visitCompoundIndexSet( | 1413 return visitor.visitCompoundIndexSet( |
| 1355 node, | 1414 node, |
| 1356 node.receiver, | 1415 node.receiver, |
| 1357 node.arguments.first, | 1416 node.arguments.first, |
| 1358 operator, | 1417 operator, |
| 1359 node.arguments.tail.head, | 1418 node.arguments.tail.head, |
| 1360 arg); | 1419 arg); |
| 1420 case AccessKind.UNRESOLVED_SUPER: | |
| 1361 case AccessKind.UNRESOLVED: | 1421 case AccessKind.UNRESOLVED: |
| 1422 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1362 return visitor.errorUnresolvedSuperCompoundIndexSet( | 1423 return visitor.errorUnresolvedSuperCompoundIndexSet( |
| 1363 node, | 1424 node, |
| 1364 semantics.element, | 1425 semantics.element, |
| 1365 node.arguments.first, | 1426 node.arguments.first, |
| 1366 operator, | 1427 operator, |
| 1367 node.arguments.tail.head, | 1428 node.arguments.tail.head, |
| 1368 arg); | 1429 arg); |
| 1369 case AccessKind.COMPOUND: | 1430 case AccessKind.COMPOUND: |
| 1370 CompoundAccessSemantics compoundSemantics = semantics; | 1431 CompoundAccessSemantics compoundSemantics = semantics; |
| 1371 switch (compoundSemantics.compoundAccessKind) { | 1432 switch (compoundSemantics.compoundAccessKind) { |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1520 break; | 1581 break; |
| 1521 case AccessKind.SUPER_GETTER: | 1582 case AccessKind.SUPER_GETTER: |
| 1522 // This is not a valid case. | 1583 // This is not a valid case. |
| 1523 break; | 1584 break; |
| 1524 case AccessKind.SUPER_SETTER: | 1585 case AccessKind.SUPER_SETTER: |
| 1525 // This is not a valid case. | 1586 // This is not a valid case. |
| 1526 break; | 1587 break; |
| 1527 case AccessKind.CONSTANT: | 1588 case AccessKind.CONSTANT: |
| 1528 // TODO(johnniwinther): Should this be a valid case? | 1589 // TODO(johnniwinther): Should this be a valid case? |
| 1529 break; | 1590 break; |
| 1591 case AccessKind.UNRESOLVED_SUPER: | |
| 1530 case AccessKind.UNRESOLVED: | 1592 case AccessKind.UNRESOLVED: |
| 1593 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1531 return visitor.errorUnresolvedPrefix( | 1594 return visitor.errorUnresolvedPrefix( |
| 1532 node, | 1595 node, |
| 1533 semantics.element, | 1596 semantics.element, |
| 1534 operator, | 1597 operator, |
| 1535 arg); | 1598 arg); |
| 1536 case AccessKind.COMPOUND: | 1599 case AccessKind.COMPOUND: |
| 1537 CompoundAccessSemantics compoundSemantics = semantics; | 1600 CompoundAccessSemantics compoundSemantics = semantics; |
| 1538 switch (compoundSemantics.compoundAccessKind) { | 1601 switch (compoundSemantics.compoundAccessKind) { |
| 1539 case CompoundAccessKind.STATIC_GETTER_SETTER: | 1602 case CompoundAccessKind.STATIC_GETTER_SETTER: |
| 1540 return visitor.visitStaticGetterSetterPrefix( | 1603 return visitor.visitStaticGetterSetterPrefix( |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1734 break; | 1797 break; |
| 1735 case AccessKind.SUPER_GETTER: | 1798 case AccessKind.SUPER_GETTER: |
| 1736 // This is not a valid case. | 1799 // This is not a valid case. |
| 1737 break; | 1800 break; |
| 1738 case AccessKind.SUPER_SETTER: | 1801 case AccessKind.SUPER_SETTER: |
| 1739 // This is not a valid case. | 1802 // This is not a valid case. |
| 1740 break; | 1803 break; |
| 1741 case AccessKind.CONSTANT: | 1804 case AccessKind.CONSTANT: |
| 1742 // TODO(johnniwinther): Should this be a valid case? | 1805 // TODO(johnniwinther): Should this be a valid case? |
| 1743 break; | 1806 break; |
| 1807 case AccessKind.UNRESOLVED_SUPER: | |
| 1744 case AccessKind.UNRESOLVED: | 1808 case AccessKind.UNRESOLVED: |
| 1809 // TODO(johnniwinther): Support these through [AccessKind.COMPOUND]. | |
| 1745 return visitor.errorUnresolvedPostfix( | 1810 return visitor.errorUnresolvedPostfix( |
| 1746 node, | 1811 node, |
| 1747 semantics.element, | 1812 semantics.element, |
| 1748 operator, | 1813 operator, |
| 1749 arg); | 1814 arg); |
| 1750 case AccessKind.COMPOUND: | 1815 case AccessKind.COMPOUND: |
| 1751 CompoundAccessSemantics compoundSemantics = semantics; | 1816 CompoundAccessSemantics compoundSemantics = semantics; |
| 1752 switch (compoundSemantics.compoundAccessKind) { | 1817 switch (compoundSemantics.compoundAccessKind) { |
| 1753 case CompoundAccessKind.STATIC_GETTER_SETTER: | 1818 case CompoundAccessKind.STATIC_GETTER_SETTER: |
| 1754 return visitor.visitStaticGetterSetterPostfix( | 1819 return visitor.visitStaticGetterSetterPostfix( |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2084 final ConstructorElement constructor; | 2149 final ConstructorElement constructor; |
| 2085 final Selector selector; | 2150 final Selector selector; |
| 2086 | 2151 |
| 2087 ThisConstructorInvokeStructure(this.constructor, this.selector); | 2152 ThisConstructorInvokeStructure(this.constructor, this.selector); |
| 2088 | 2153 |
| 2089 R dispatch(SemanticDeclarationVisitor<R, A> visitor, Send node, A arg) { | 2154 R dispatch(SemanticDeclarationVisitor<R, A> visitor, Send node, A arg) { |
| 2090 return visitor.visitThisConstructorInvoke( | 2155 return visitor.visitThisConstructorInvoke( |
| 2091 node, constructor, node.argumentsNode, selector, arg); | 2156 node, constructor, node.argumentsNode, selector, arg); |
| 2092 } | 2157 } |
| 2093 } | 2158 } |
| OLD | NEW |