Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test.dart

Issue 1126173002: Refactor handling of compounds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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.semantics_visitor_test; 5 library dart2js.semantics_visitor_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:mirrors';
8 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
9 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
10 import 'package:compiler/src/constants/expressions.dart'; 11 import 'package:compiler/src/constants/expressions.dart';
11 import 'package:compiler/src/dart_types.dart'; 12 import 'package:compiler/src/dart_types.dart';
12 import 'package:compiler/src/dart2jslib.dart'; 13 import 'package:compiler/src/dart2jslib.dart';
13 import 'package:compiler/src/elements/elements.dart'; 14 import 'package:compiler/src/elements/elements.dart';
14 import 'package:compiler/src/resolution/resolution.dart'; 15 import 'package:compiler/src/resolution/resolution.dart';
15 import 'package:compiler/src/resolution/semantic_visitor.dart'; 16 import 'package:compiler/src/resolution/semantic_visitor.dart';
16 import 'package:compiler/src/resolution/operators.dart'; 17 import 'package:compiler/src/resolution/operators.dart';
17 import 'package:compiler/src/tree/tree.dart'; 18 import 'package:compiler/src/tree/tree.dart';
(...skipping 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
958 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_GET, 959 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_GET,
959 constant: 'C')), 960 constant: 'C')),
960 const Test( 961 const Test(
961 ''' 962 '''
962 class C {} 963 class C {}
963 m() => C(null, 42); 964 m() => C(null, 42);
964 ''', 965 ''',
965 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE, 966 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_INVOKE,
966 constant: 'C', 967 constant: 'C',
967 arguments: '(null,42)')), 968 arguments: '(null,42)')),
969 const Test(
970 '''
971 class C {}
972 m() => C += 42;
973 ''',
974 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_COMPOUND,
975 constant: 'C',
976 operator: '+=',
977 rhs: '42')),
978 const Test(
979 '''
980 class C {}
981 m() => ++C;
982 ''',
983 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_PREFIX,
984 constant: 'C',
985 operator: '++')),
986 const Test(
987 '''
988 class C {}
989 m() => C--;
990 ''',
991 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_POSTFIX,
992 constant: 'C',
993 operator: '--')),
994 const Test(
995 '''
996 class C {}
997 m() => C;
998 ''',
999 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_GET,
1000 constant: 'C')),
968 ], 1001 ],
969 'Typedef type literals': const [ 1002 'Typedef type literals': const [
970 // Typedef type literals 1003 // Typedef type literals
971 const Test( 1004 const Test(
972 ''' 1005 '''
973 typedef F(); 1006 typedef F();
974 m() => F; 1007 m() => F;
975 ''', 1008 ''',
976 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_GET, 1009 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_GET,
977 constant: 'F')), 1010 constant: 'F')),
978 const Test( 1011 const Test(
979 ''' 1012 '''
980 typedef F(); 1013 typedef F();
981 m() => F(null, 42); 1014 m() => F(null, 42);
982 ''', 1015 ''',
983 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_INVOKE, 1016 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_INVOKE,
984 constant: 'F', 1017 constant: 'F',
985 arguments: '(null,42)')), 1018 arguments: '(null,42)')),
1019 const Test(
1020 '''
1021 typedef F();
1022 m() => F += 42;
1023 ''',
1024 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
1025 constant: 'F',
1026 operator: '+=',
1027 rhs: '42')),
1028 const Test(
1029 '''
1030 typedef F();
1031 m() => ++F;
1032 ''',
1033 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_PREFIX,
1034 constant: 'F',
1035 operator: '++')),
1036 const Test(
1037 '''
1038 typedef F();
1039 m() => F--;
1040 ''',
1041 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_POSTFIX,
1042 constant: 'F',
1043 operator: '--')),
986 ], 1044 ],
987 'Type variable type literals': const [ 1045 'Type variable type literals': const [
988 // Type variable type literals 1046 // Type variable type literals
989 const Test.clazz( 1047 const Test.clazz(
990 ''' 1048 '''
991 class C<T> { 1049 class C<T> {
992 m() => T; 1050 m() => T;
993 } 1051 }
994 ''', 1052 ''',
995 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET, 1053 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET,
996 element: 'type_variable(C#T)')), 1054 element: 'type_variable(C#T)')),
997 const Test.clazz( 1055 const Test.clazz(
998 ''' 1056 '''
999 class C<T> { 1057 class C<T> {
1000 m() => T(null, 42); 1058 m() => T(null, 42);
1001 } 1059 }
1002 ''', 1060 ''',
1003 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE, 1061 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE,
1004 element: 'type_variable(C#T)', 1062 element: 'type_variable(C#T)',
1005 arguments: '(null,42)')), 1063 arguments: '(null,42)')),
1064 const Test.clazz(
1065 '''
1066 class C<T> {
1067 m() => T += 42;
1068 }
1069 ''',
1070 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND,
1071 element: 'type_variable(C#T)',
1072 operator: '+=',
1073 rhs: '42')),
1074 const Test.clazz(
1075 '''
1076 class C<T> {
1077 m() => ++T;
1078 }
1079 ''',
1080 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_PREFIX,
1081 element: 'type_variable(C#T)',
1082 operator: '++')),
1083 const Test.clazz(
1084 '''
1085 class C<T> {
1086 m() => T--;
1087 }
1088 ''',
1089 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
1090 element: 'type_variable(C#T)',
1091 operator: '--')),
1006 1092
1007 ], 1093 ],
1008 'Dynamic type literals': const [ 1094 'Dynamic type literals': const [
1009 // Dynamic type literals 1095 // Dynamic type literals
1010 const Test( 1096 const Test(
1011 ''' 1097 '''
1012 m() => dynamic; 1098 m() => dynamic;
1013 ''', 1099 ''',
1014 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_GET, 1100 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_GET,
1015 constant: 'dynamic')), 1101 constant: 'dynamic')),
1016 // TODO(johnniwinther): Enable this when we pass the right constant. 1102 // TODO(johnniwinther): Update these to expect the constant to be `dynamic`
1017 // Currently we generated the constant for `Type` instead of `dynamic`. 1103 // instead of `Type`. Currently the compile time constant evaluator cannot
1018 /*const Test( 1104 // detect `dynamic` as a constant subexpression.
1105 const Test(
1019 ''' 1106 '''
1020 m() { dynamic(null, 42); } 1107 m() { dynamic(null, 42); }
1021 ''', 1108 ''',
1022 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE, 1109 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE,
1023 constant: 'dynamic', 1110 constant: 'Type',
1024 arguments: '(null,42)')),*/ 1111 arguments: '(null,42)')),
1112 const Test(
1113 '''
1114 m() => dynamic += 42;
1115 ''',
1116 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
1117 constant: 'Type',
1118 operator: '+=',
1119 rhs: '42')),
1120 const Test(
1121 '''
1122 m() => ++dynamic;
1123 ''',
1124 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_PREFIX,
1125 constant: 'Type',
1126 operator: '++')),
1127 const Test(
1128 '''
1129 m() => dynamic--;
1130 ''',
1131 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_POSTFIX,
1132 constant: 'Type',
1133 operator: '--')),
1025 ], 1134 ],
1026 'Assert': const [ 1135 'Assert': const [
1027 // Assert 1136 // Assert
1028 const Test( 1137 const Test(
1029 ''' 1138 '''
1030 m() { assert(false); } 1139 m() { assert(false); }
1031 ''', 1140 ''',
1032 const Visit(VisitKind.VISIT_ASSERT, expression: 'false')), 1141 const Visit(VisitKind.VISIT_ASSERT, expression: 'false')),
1033 ], 1142 ],
1034 'Logical and': const [ 1143 'Logical and': const [
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 const Test.clazz( 1359 const Test.clazz(
1251 ''' 1360 '''
1252 class B { 1361 class B {
1253 operator []=(a, b) {} 1362 operator []=(a, b) {}
1254 } 1363 }
1255 class C extends B { 1364 class C extends B {
1256 m() => ++super[42]; 1365 m() => ++super[42];
1257 } 1366 }
1258 ''', 1367 ''',
1259 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX, 1368 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX,
1369 setter: 'function(B#[]=)',
1260 index: '42', 1370 index: '42',
1261 operator: '++')), 1371 operator: '++')),
1262 const Test.clazz( 1372 const Test.clazz(
1263 ''' 1373 '''
1264 class B { 1374 class B {
1265 } 1375 }
1266 class C extends B { 1376 class C extends B {
1267 m() => ++super[42]; 1377 m() => ++super[42];
1268 } 1378 }
1269 ''', 1379 ''',
1270 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX, 1380 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_PREFIX,
1271 index: '42', 1381 index: '42',
1272 operator: '++')), 1382 operator: '++')),
1273 const Test.clazz( 1383 const Test.clazz(
1274 ''' 1384 '''
1275 class B { 1385 class B {
1276 operator [](_) => null; 1386 operator [](_) => null;
1277 } 1387 }
1278 class C extends B { 1388 class C extends B {
1279 m() => ++super[42]; 1389 m() => ++super[42];
1280 } 1390 }
(...skipping 20 matching lines...) Expand all
1301 const Test.clazz( 1411 const Test.clazz(
1302 ''' 1412 '''
1303 class B { 1413 class B {
1304 operator []=(a, b) {} 1414 operator []=(a, b) {}
1305 } 1415 }
1306 class C extends B { 1416 class C extends B {
1307 m() => super[42]--; 1417 m() => super[42]--;
1308 } 1418 }
1309 ''', 1419 ''',
1310 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX, 1420 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX,
1421 setter: 'function(B#[]=)',
1311 index: '42', 1422 index: '42',
1312 operator: '--')), 1423 operator: '--')),
1313 const Test.clazz( 1424 const Test.clazz(
1314 ''' 1425 '''
1315 class B { 1426 class B {
1316 } 1427 }
1317 class C extends B { 1428 class C extends B {
1318 m() => super[42]--; 1429 m() => super[42]--;
1319 } 1430 }
1320 ''', 1431 ''',
1321 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX, 1432 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_POSTFIX,
1322 index: '42', 1433 index: '42',
1323 operator: '--')), 1434 operator: '--')),
1324 const Test.clazz( 1435 const Test.clazz(
1325 ''' 1436 '''
1326 class B { 1437 class B {
1327 operator [](_) => null; 1438 operator [](_) => null;
1328 } 1439 }
1329 class C extends B { 1440 class C extends B {
1330 m() => super[42]--; 1441 m() => super[42]--;
1331 } 1442 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 m(a) => a.b += 42; 1578 m(a) => a.b += 42;
1468 ''', 1579 ''',
1469 const [ 1580 const [
1470 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND, 1581 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND,
1471 receiver: 'a', operator: '+=', rhs: '42', 1582 receiver: 'a', operator: '+=', rhs: '42',
1472 getter: 'Selector(getter, b, arity=0)', 1583 getter: 'Selector(getter, b, arity=0)',
1473 setter: 'Selector(setter, b, arity=1)'), 1584 setter: 'Selector(setter, b, arity=1)'),
1474 const Visit(VisitKind.VISIT_PARAMETER_GET, 1585 const Visit(VisitKind.VISIT_PARAMETER_GET,
1475 element: 'parameter(m#a)') 1586 element: 'parameter(m#a)')
1476 ]), 1587 ]),
1477 // TODO(johnniwinther): Enable this when type literals are recognized in
1478 // SendSet.
1479 /*const Test(
1480 '''
1481 class C {}
1482 m(a) => C += 42;
1483 ''',
1484 const Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_COMPOUND,
1485 constant: 'C', operator: '+=', rhs: '42')),
1486 const Test(
1487 '''
1488 typedef F();
1489 m(a) => F += 42;
1490 ''',
1491 const Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
1492 constant: 'F', operator: '+=', rhs: '42')),
1493 const Test.clazz(
1494 '''
1495 class C<T> {
1496 m(a) => T += 42;
1497 }
1498 ''',
1499 const Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND,
1500 element: 'type_variable(C#T)', operator: '+=', rhs: '42')),
1501 const Test(
1502 '''
1503 m(a) => dynamic += 42;
1504 ''',
1505 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
1506 constant: 'dynamic',
1507 operator: '+=', rhs: '42')),*/
1508 const Test( 1588 const Test(
1509 ''' 1589 '''
1510 m(a) => a += 42; 1590 m(a) => a += 42;
1511 ''', 1591 ''',
1512 const Visit(VisitKind.VISIT_PARAMETER_COMPOUND, 1592 const Visit(VisitKind.VISIT_PARAMETER_COMPOUND,
1513 element: 'parameter(m#a)', operator: '+=', rhs: '42')), 1593 element: 'parameter(m#a)', operator: '+=', rhs: '42')),
1514 const Test( 1594 const Test(
1515 ''' 1595 '''
1596 m(final a) => a += 42;
1597 ''',
1598 const Visit(VisitKind.VISIT_FINAL_PARAMETER_COMPOUND,
1599 element: 'parameter(m#a)', operator: '+=', rhs: '42')),
1600 const Test(
1601 '''
1516 m() { 1602 m() {
1517 var a; 1603 var a;
1518 a += 42; 1604 a += 42;
1519 } 1605 }
1520 ''', 1606 ''',
1521 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_COMPOUND, 1607 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_COMPOUND,
1522 element: 'variable(m#a)', operator: '+=', rhs: '42')), 1608 element: 'variable(m#a)', operator: '+=', rhs: '42')),
1523 const Test( 1609 const Test(
1524 ''' 1610 '''
1611 m() {
1612 final a;
1613 a += 42;
1614 }
1615 ''',
1616 const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_COMPOUND,
1617 element: 'variable(m#a)', operator: '+=', rhs: '42')),
1618 const Test(
1619 '''
1620 m() {
1621 a() {}
1622 a += 42;
1623 }
1624 ''',
1625 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_COMPOUND,
1626 element: 'function(m#a)', operator: '+=', rhs: '42')),
1627 const Test(
1628 '''
1525 var a; 1629 var a;
1526 m() => a += 42; 1630 m() => a += 42;
1527 ''', 1631 ''',
1528 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_COMPOUND, 1632 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_COMPOUND,
1529 element: 'field(a)', operator: '+=', rhs: '42')), 1633 element: 'field(a)', operator: '+=', rhs: '42')),
1530 const Test( 1634 const Test(
1531 ''' 1635 '''
1532 get a => 0; 1636 get a => 0;
1533 set a(_) {} 1637 set a(_) {}
1534 m() => a += 42; 1638 m() => a += 42;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 } 1801 }
1698 class C extends B { 1802 class C extends B {
1699 m() => super.a += 42; 1803 m() => super.a += 42;
1700 } 1804 }
1701 ''', 1805 ''',
1702 const Visit(VisitKind.VISIT_SUPER_FIELD_COMPOUND, 1806 const Visit(VisitKind.VISIT_SUPER_FIELD_COMPOUND,
1703 element: 'field(B#a)', operator: '+=', rhs: '42')), 1807 element: 'field(B#a)', operator: '+=', rhs: '42')),
1704 const Test.clazz( 1808 const Test.clazz(
1705 ''' 1809 '''
1706 class B { 1810 class B {
1811 final a = 0;
1812 }
1813 class C extends B {
1814 m() => super.a += 42;
1815 }
1816 ''',
1817 const Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_COMPOUND,
1818 element: 'field(B#a)', operator: '+=', rhs: '42')),
1819 const Test.clazz(
1820 '''
1821 class B {
1707 get a => 0; 1822 get a => 0;
1708 set a (_) {} 1823 set a (_) {}
1709 } 1824 }
1710 class C extends B { 1825 class C extends B {
1711 m() => super.a += 42; 1826 m() => super.a += 42;
1712 } 1827 }
1713 ''', 1828 ''',
1714 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_COMPOUND, 1829 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_COMPOUND,
1715 getter: 'getter(B#a)', setter: 'setter(B#a)', 1830 getter: 'getter(B#a)', setter: 'setter(B#a)',
1716 operator: '+=', rhs: '42')), 1831 operator: '+=', rhs: '42')),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 final a; 1886 final a;
1772 } 1887 }
1773 1888
1774 class C extends B { 1889 class C extends B {
1775 m() => super.a += 42; 1890 m() => super.a += 42;
1776 } 1891 }
1777 ''', 1892 ''',
1778 const Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND, 1893 const Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND,
1779 getter: 'field(B#a)', setter: 'field(A#a)', 1894 getter: 'field(B#a)', setter: 'field(A#a)',
1780 operator: '+=', rhs: '42')),*/ 1895 operator: '+=', rhs: '42')),*/
1896 const Test.clazz(
1897 '''
1898 class B {
1899 a() {}
1900 }
1901 class C extends B {
1902 m() => super.a += 42;
1903 }
1904 ''',
1905 const Visit(VisitKind.VISIT_SUPER_METHOD_COMPOUND,
1906 element: 'function(B#a)',
1907 operator: '+=', rhs: '42')),
1908 const Test.clazz(
1909 '''
1910 class B {
1911 }
1912 class C extends B {
1913 m() => super.a += 42;
1914 }
1915 ''',
1916 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_COMPOUND,
1917 operator: '+=', rhs: '42')),
1918 const Test.clazz(
1919 '''
1920 class B {
1921 set a(_) {}
1922 }
1923 class C extends B {
1924 m() => super.a += 42;
1925 }
1926 ''',
1927 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND,
1928 setter: 'setter(B#a)', operator: '+=', rhs: '42')),
1929 const Test.clazz(
1930 '''
1931 class B {
1932 get a => 42;
1933 }
1934 class C extends B {
1935 m() => super.a += 42;
1936 }
1937 ''',
1938 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND,
1939 getter: 'getter(B#a)', operator: '+=', rhs: '42')),
1940
1941 const Test.clazz(
1942 '''
1943 class C {
1944 static set a(var value) { }
1945 m() => a += 42;
1946 }
1947 ''',
1948 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND,
1949 setter: 'setter(C#a)', operator: '+=', rhs: '42')),
1950
1951 const Test.clazz(
1952 '''
1953 class C {
1954 static get a => 42;
1955 m() => C.a += 42;
1956 }
1957 ''',
1958 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND,
1959 getter: 'getter(C#a)', operator: '+=', rhs: '42')),
1960
1961 const Test.clazz(
1962 '''
1963 class C {
1964 static final a = 42;
1965 m() => C.a += 42;
1966 }
1967 ''',
1968 const Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_COMPOUND,
1969 element: 'field(C#a)', operator: '+=', rhs: '42')),
1970
1971 const Test(
1972 '''
1973 class C {
1974 static a(var value) { }
1975 }
1976 m() => C.a += 42;
1977 ''',
1978 const Visit(VisitKind.VISIT_STATIC_METHOD_COMPOUND,
1979 element: 'function(C#a)', operator: '+=', rhs: '42')),
1980
1981 const Test(
1982 '''
1983 set a(var value) { }
1984 m() => a += 42;
1985 ''',
1986 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND,
1987 setter: 'setter(a)', operator: '+=', rhs: '42')),
1988
1989 const Test(
1990 '''
1991 get a => 42;
1992 m() => a += 42;
1993 ''',
1994 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND,
1995 getter: 'getter(a)', operator: '+=', rhs: '42')),
1996
1997 const Test(
1998 '''
1999 a(var value) { }
2000 m() => a += 42;
2001 ''',
2002 const Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_COMPOUND,
2003 element: 'function(a)', operator: '+=', rhs: '42')),
2004
2005 const Test(
2006 '''
2007 final a = 42;
2008 m() => a += 42;
2009 ''',
2010 const Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND,
2011 element: 'field(a)', operator: '+=', rhs: '42')),
2012
2013 const Test(
2014 '''
2015 m() => unresolved += 42;
2016 ''',
2017 const Visit(VisitKind.VISIT_UNRESOLVED_COMPOUND,
2018 operator: '+=', rhs: '42')),
1781 ], 2019 ],
1782 'Compound index assignment': const [ 2020 'Compound index assignment': const [
1783 // Compound index assignment 2021 // Compound index assignment
1784 const Test( 2022 const Test(
1785 ''' 2023 '''
1786 m() => 0[1] += 42; 2024 m() => 0[1] += 42;
1787 ''', 2025 ''',
1788 const Visit(VisitKind.VISIT_COMPOUND_INDEX_SET, 2026 const Visit(VisitKind.VISIT_COMPOUND_INDEX_SET,
1789 receiver: '0', index: '1', operator: '+=', rhs: '42')), 2027 receiver: '0', index: '1', operator: '+=', rhs: '42')),
1790 const Test.clazz( 2028 const Test.clazz(
(...skipping 12 matching lines...) Expand all
1803 const Test.clazz( 2041 const Test.clazz(
1804 ''' 2042 '''
1805 class B { 2043 class B {
1806 operator []=(a, b) {} 2044 operator []=(a, b) {}
1807 } 2045 }
1808 class C extends B { 2046 class C extends B {
1809 m() => super[1] += 42; 2047 m() => super[1] += 42;
1810 } 2048 }
1811 ''', 2049 ''',
1812 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET, 2050 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET,
2051 setter: 'function(B#[]=)',
1813 index: '1', operator: '+=', rhs: '42')), 2052 index: '1', operator: '+=', rhs: '42')),
1814 const Test.clazz( 2053 const Test.clazz(
1815 ''' 2054 '''
1816 class B { 2055 class B {
1817 } 2056 }
1818 class C extends B { 2057 class C extends B {
1819 m() => super[1] += 42; 2058 m() => super[1] += 42;
1820 } 2059 }
1821 ''', 2060 ''',
1822 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET, 2061 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_COMPOUND_INDEX_SET,
1823 index: '1', operator: '+=', rhs: '42')), 2062 index: '1', operator: '+=', rhs: '42')),
1824 const Test.clazz( 2063 const Test.clazz(
1825 ''' 2064 '''
1826 class B { 2065 class B {
1827 operator [](_) {} 2066 operator [](_) {}
1828 } 2067 }
1829 class C extends B { 2068 class C extends B {
1830 m() => super[1] += 42; 2069 m() => super[1] += 42;
1831 } 2070 }
1832 ''', 2071 ''',
(...skipping 16 matching lines...) Expand all
1849 element: 'parameter(m#a)') 2088 element: 'parameter(m#a)')
1850 ]), 2089 ]),
1851 const Test( 2090 const Test(
1852 ''' 2091 '''
1853 m(a) => ++a; 2092 m(a) => ++a;
1854 ''', 2093 ''',
1855 const Visit(VisitKind.VISIT_PARAMETER_PREFIX, 2094 const Visit(VisitKind.VISIT_PARAMETER_PREFIX,
1856 element: 'parameter(m#a)', operator: '++')), 2095 element: 'parameter(m#a)', operator: '++')),
1857 const Test( 2096 const Test(
1858 ''' 2097 '''
2098 m(final a) => ++a;
2099 ''',
2100 const Visit(VisitKind.VISIT_FINAL_PARAMETER_PREFIX,
2101 element: 'parameter(m#a)', operator: '++')),
2102 const Test(
2103 '''
1859 m() { 2104 m() {
1860 var a; 2105 var a;
1861 --a; 2106 --a;
1862 } 2107 }
1863 ''', 2108 ''',
1864 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_PREFIX, 2109 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_PREFIX,
1865 element: 'variable(m#a)', operator: '--')), 2110 element: 'variable(m#a)', operator: '--')),
1866 const Test( 2111 const Test(
1867 ''' 2112 '''
2113 m() {
2114 final a = 42;
2115 --a;
2116 }
2117 ''',
2118 const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_PREFIX,
2119 element: 'variable(m#a)', operator: '--')),
2120 const Test(
2121 '''
2122 m() {
2123 a() {}
2124 --a;
2125 }
2126 ''',
2127 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_PREFIX,
2128 element: 'function(m#a)', operator: '--')),
2129 const Test(
2130 '''
1868 var a; 2131 var a;
1869 m() => ++a; 2132 m() => ++a;
1870 ''', 2133 ''',
1871 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_PREFIX, 2134 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_PREFIX,
1872 element: 'field(a)', operator: '++')), 2135 element: 'field(a)', operator: '++')),
1873 const Test( 2136 const Test(
1874 ''' 2137 '''
1875 get a => 0; 2138 get a => 0;
1876 set a(_) {} 2139 set a(_) {}
1877 m() => --a; 2140 m() => --a;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 } 2255 }
1993 class C extends B { 2256 class C extends B {
1994 m() => --super.a; 2257 m() => --super.a;
1995 } 2258 }
1996 ''', 2259 ''',
1997 const Visit(VisitKind.VISIT_SUPER_FIELD_PREFIX, 2260 const Visit(VisitKind.VISIT_SUPER_FIELD_PREFIX,
1998 element: 'field(B#a)', operator: '--')), 2261 element: 'field(B#a)', operator: '--')),
1999 const Test.clazz( 2262 const Test.clazz(
2000 ''' 2263 '''
2001 class B { 2264 class B {
2265 final a = 0;
2266 }
2267 class C extends B {
2268 m() => --super.a;
2269 }
2270 ''',
2271 const Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_PREFIX,
2272 element: 'field(B#a)', operator: '--')),
2273 const Test.clazz(
2274 '''
2275 class B {
2002 get a => 0; 2276 get a => 0;
2003 set a (_) {} 2277 set a (_) {}
2004 } 2278 }
2005 class C extends B { 2279 class C extends B {
2006 m() => --super.a; 2280 m() => --super.a;
2007 } 2281 }
2008 ''', 2282 ''',
2009 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_PREFIX, 2283 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_PREFIX,
2010 getter: 'getter(B#a)', setter: 'setter(B#a)', 2284 getter: 'getter(B#a)', setter: 'setter(B#a)',
2011 operator: '--')), 2285 operator: '--')),
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2049 set a(_) {} 2323 set a(_) {}
2050 } 2324 }
2051 2325
2052 class C extends B { 2326 class C extends B {
2053 m() => ++super.a; 2327 m() => ++super.a;
2054 } 2328 }
2055 ''', 2329 ''',
2056 const Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_PREFIX, 2330 const Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_PREFIX,
2057 getter: 'field(A#a)', setter: 'setter(B#a)', 2331 getter: 'field(A#a)', setter: 'setter(B#a)',
2058 operator: '++')), 2332 operator: '++')),
2333 const Test.clazz(
2334 '''
2335 class B {
2336 a() {}
2337 }
2338 class C extends B {
2339 m() => ++super.a;
2340 }
2341 ''',
2342 const Visit(VisitKind.VISIT_SUPER_METHOD_PREFIX,
2343 element: 'function(B#a)',
2344 operator: '++')),
2345 const Test.clazz(
2346 '''
2347 class B {
2348 }
2349 class C extends B {
2350 m() => ++super.a;
2351 }
2352 ''',
2353 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_PREFIX,
2354 operator: '++')),
2355 const Test.clazz(
2356 '''
2357 class B {
2358 set a(_) {}
2359 }
2360 class C extends B {
2361 m() => ++super.a;
2362 }
2363 ''',
2364 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_PREFIX,
2365 setter: 'setter(B#a)', operator: '++')),
2366 const Test.clazz(
2367 '''
2368 class B {
2369 get a => 42;
2370 }
2371 class C extends B {
2372 m() => ++super.a;
2373 }
2374 ''',
2375 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
2376 getter: 'getter(B#a)', operator: '++')),
2377
2378 const Test.clazz(
2379 '''
2380 class C {
2381 static set a(var value) { }
2382 m() => ++a;
2383 }
2384 ''',
2385 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_PREFIX,
2386 setter: 'setter(C#a)', operator: '++')),
2387
2388 const Test.clazz(
2389 '''
2390 class C {
2391 static get a => 42;
2392 m() => ++C.a;
2393 }
2394 ''',
2395 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_PREFIX,
2396 getter: 'getter(C#a)', operator: '++')),
2397
2398 const Test.clazz(
2399 '''
2400 class C {
2401 static final a = 42;
2402 m() => ++C.a;
2403 }
2404 ''',
2405 const Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_PREFIX,
2406 element: 'field(C#a)', operator: '++')),
2407
2408 const Test(
2409 '''
2410 class C {
2411 static a(var value) { }
2412 }
2413 m() => ++C.a;
2414 ''',
2415 const Visit(VisitKind.VISIT_STATIC_METHOD_PREFIX,
2416 element: 'function(C#a)', operator: '++')),
2417
2418 const Test(
2419 '''
2420 set a(var value) { }
2421 m() => ++a;
2422 ''',
2423 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_PREFIX,
2424 setter: 'setter(a)', operator: '++')),
2425
2426 const Test(
2427 '''
2428 get a => 42;
2429 m() => ++a;
2430 ''',
2431 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_PREFIX,
2432 getter: 'getter(a)', operator: '++')),
2433
2434 const Test(
2435 '''
2436 a(var value) { }
2437 m() => ++a;
2438 ''',
2439 const Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_PREFIX,
2440 element: 'function(a)', operator: '++')),
2441
2442 const Test(
2443 '''
2444 final a = 42;
2445 m() => ++a;
2446 ''',
2447 const Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX,
2448 element: 'field(a)', operator: '++')),
2449
2450 const Test(
2451 '''
2452 m() => ++unresolved;
2453 ''',
2454 const Visit(VisitKind.VISIT_UNRESOLVED_PREFIX,
2455 operator: '++')),
2059 ], 2456 ],
2060 'Postfix expression': const [ 2457 'Postfix expression': const [
2061 // Postfix expression 2458 // Postfix expression
2062 const Test( 2459 const Test(
2063 ''' 2460 '''
2064 m(a) => a.b--; 2461 m(a) => a.b--;
2065 ''', 2462 ''',
2066 const [ 2463 const [
2067 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_POSTFIX, 2464 const Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_POSTFIX,
2068 receiver: 'a', operator: '--', 2465 receiver: 'a', operator: '--',
2069 getter: 'Selector(getter, b, arity=0)', 2466 getter: 'Selector(getter, b, arity=0)',
2070 setter: 'Selector(setter, b, arity=1)'), 2467 setter: 'Selector(setter, b, arity=1)'),
2071 const Visit(VisitKind.VISIT_PARAMETER_GET, 2468 const Visit(VisitKind.VISIT_PARAMETER_GET,
2072 element: 'parameter(m#a)') 2469 element: 'parameter(m#a)')
2073 ]), 2470 ]),
2074 const Test( 2471 const Test(
2075 ''' 2472 '''
2076 m(a) => a++; 2473 m(a) => a++;
2077 ''', 2474 ''',
2078 const Visit(VisitKind.VISIT_PARAMETER_POSTFIX, 2475 const Visit(VisitKind.VISIT_PARAMETER_POSTFIX,
2079 element: 'parameter(m#a)', operator: '++')), 2476 element: 'parameter(m#a)', operator: '++')),
2080 const Test( 2477 const Test(
2081 ''' 2478 '''
2479 m(final a) => a++;
2480 ''',
2481 const Visit(VisitKind.VISIT_FINAL_PARAMETER_POSTFIX,
2482 element: 'parameter(m#a)', operator: '++')),
2483 const Test(
2484 '''
2082 m() { 2485 m() {
2083 var a; 2486 var a;
2084 a--; 2487 a--;
2085 } 2488 }
2086 ''', 2489 ''',
2087 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_POSTFIX, 2490 const Visit(VisitKind.VISIT_LOCAL_VARIABLE_POSTFIX,
2088 element: 'variable(m#a)', operator: '--')), 2491 element: 'variable(m#a)', operator: '--')),
2089 const Test( 2492 const Test(
2090 ''' 2493 '''
2494 m() {
2495 final a = 42;
2496 a--;
2497 }
2498 ''',
2499 const Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_POSTFIX,
2500 element: 'variable(m#a)', operator: '--')),
2501 const Test(
2502 '''
2503 m() {
2504 a() {}
2505 a--;
2506 }
2507 ''',
2508 const Visit(VisitKind.VISIT_LOCAL_FUNCTION_POSTFIX,
2509 element: 'function(m#a)', operator: '--')),
2510 const Test(
2511 '''
2091 var a; 2512 var a;
2092 m() => a++; 2513 m() => a++;
2093 ''', 2514 ''',
2094 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_POSTFIX, 2515 const Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_POSTFIX,
2095 element: 'field(a)', operator: '++')), 2516 element: 'field(a)', operator: '++')),
2096 const Test( 2517 const Test(
2097 ''' 2518 '''
2098 get a => 0; 2519 get a => 0;
2099 set a(_) {} 2520 set a(_) {}
2100 m() => a--; 2521 m() => a--;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 } 2636 }
2216 class C extends B { 2637 class C extends B {
2217 m() => super.a--; 2638 m() => super.a--;
2218 } 2639 }
2219 ''', 2640 ''',
2220 const Visit(VisitKind.VISIT_SUPER_FIELD_POSTFIX, 2641 const Visit(VisitKind.VISIT_SUPER_FIELD_POSTFIX,
2221 element: 'field(B#a)', operator: '--')), 2642 element: 'field(B#a)', operator: '--')),
2222 const Test.clazz( 2643 const Test.clazz(
2223 ''' 2644 '''
2224 class B { 2645 class B {
2646 final a = 0;
2647 }
2648 class C extends B {
2649 m() => super.a--;
2650 }
2651 ''',
2652 const Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_POSTFIX,
2653 element: 'field(B#a)', operator: '--')),
2654 const Test.clazz(
2655 '''
2656 class B {
2225 get a => 0; 2657 get a => 0;
2226 set a (_) {} 2658 set a (_) {}
2227 } 2659 }
2228 class C extends B { 2660 class C extends B {
2229 m() => super.a--; 2661 m() => super.a--;
2230 } 2662 }
2231 ''', 2663 ''',
2232 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_POSTFIX, 2664 const Visit(VisitKind.VISIT_SUPER_GETTER_SETTER_POSTFIX,
2233 getter: 'getter(B#a)', setter: 'setter(B#a)', 2665 getter: 'getter(B#a)', setter: 'setter(B#a)',
2234 operator: '--')), 2666 operator: '--')),
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2272 set a(_) {} 2704 set a(_) {}
2273 } 2705 }
2274 2706
2275 class C extends B { 2707 class C extends B {
2276 m() => super.a++; 2708 m() => super.a++;
2277 } 2709 }
2278 ''', 2710 ''',
2279 const Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_POSTFIX, 2711 const Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_POSTFIX,
2280 getter: 'field(A#a)', setter: 'setter(B#a)', 2712 getter: 'field(A#a)', setter: 'setter(B#a)',
2281 operator: '++')), 2713 operator: '++')),
2714 const Test.clazz(
2715 '''
2716 class B {
2717 a() {}
2718 }
2719 class C extends B {
2720 m() => super.a++;
2721 }
2722 ''',
2723 const Visit(VisitKind.VISIT_SUPER_METHOD_POSTFIX,
2724 element: 'function(B#a)',
2725 operator: '++')),
2726 const Test.clazz(
2727 '''
2728 class B {
2729 }
2730 class C extends B {
2731 m() => super.a++;
2732 }
2733 ''',
2734 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_POSTFIX,
2735 operator: '++')),
2736 const Test.clazz(
2737 '''
2738 class B {
2739 set a(_) {}
2740 }
2741 class C extends B {
2742 m() => super.a++;
2743 }
2744 ''',
2745 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_POSTFIX,
2746 setter: 'setter(B#a)', operator: '++')),
2747 const Test.clazz(
2748 '''
2749 class B {
2750 get a => 42;
2751 }
2752 class C extends B {
2753 m() => super.a++;
2754 }
2755 ''',
2756 const Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_POSTFIX,
2757 getter: 'getter(B#a)', operator: '++')),
2758
2759 const Test.clazz(
2760 '''
2761 class C {
2762 static set a(var value) { }
2763 m() => a++;
2764 }
2765 ''',
2766 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_POSTFIX,
2767 setter: 'setter(C#a)', operator: '++')),
2768
2769 const Test.clazz(
2770 '''
2771 class C {
2772 static get a => 42;
2773 m() => C.a++;
2774 }
2775 ''',
2776 const Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_POSTFIX,
2777 getter: 'getter(C#a)', operator: '++')),
2778
2779 const Test.clazz(
2780 '''
2781 class C {
2782 static final a = 42;
2783 m() => C.a++;
2784 }
2785 ''',
2786 const Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_POSTFIX,
2787 element: 'field(C#a)', operator: '++')),
2282 2788
2283 const Test( 2789 const Test(
2284 ''' 2790 '''
2285 set topLevel(var value) { } 2791 class C {
2286 m() => topLevel++; 2792 static a(var value) { }
2793 }
2794 m() => C.a++;
2287 ''', 2795 ''',
2288 const Visit(VisitKind.ERROR_UNRESOLVED_POSTFIX, 2796 const Visit(VisitKind.VISIT_STATIC_METHOD_POSTFIX,
2797 element: 'function(C#a)', operator: '++')),
2798
2799 const Test(
2800 '''
2801 set a(var value) { }
2802 m() => a++;
2803 ''',
2804 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_POSTFIX,
2805 setter: 'setter(a)', operator: '++')),
2806
2807 const Test(
2808 '''
2809 get a => 42;
2810 m() => a++;
2811 ''',
2812 const Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_POSTFIX,
2813 getter: 'getter(a)', operator: '++')),
2814
2815 const Test(
2816 '''
2817 a(var value) { }
2818 m() => a++;
2819 ''',
2820 const Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_POSTFIX,
2821 element: 'function(a)', operator: '++')),
2822
2823 const Test(
2824 '''
2825 final a = 42;
2826 m() => a++;
2827 ''',
2828 const Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX,
2829 element: 'field(a)', operator: '++')),
2830
2831 const Test(
2832 '''
2833 m() => unresolved++;
2834 ''',
2835 const Visit(VisitKind.VISIT_UNRESOLVED_POSTFIX,
2289 operator: '++')), 2836 operator: '++')),
2290 ], 2837 ],
2291 'Constructor invocations': const [ 2838 'Constructor invocations': const [
2292 const Test( 2839 const Test(
2293 ''' 2840 '''
2294 class Class { 2841 class Class {
2295 const Class(a, b); 2842 const Class(a, b);
2296 } 2843 }
2297 m() => const Class(true, 42); 2844 m() => const Class(true, 42);
2298 ''', 2845 ''',
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 factory Class(a, b) = AbstractClass; 2998 factory Class(a, b) = AbstractClass;
2452 } 2999 }
2453 m() => new Class(true, 42); 3000 m() => new Class(true, 42);
2454 ''', 3001 ''',
2455 const Visit( 3002 const Visit(
2456 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, 3003 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
2457 element: 'function(Class#)', 3004 element: 'function(Class#)',
2458 arguments: '(true,42)', 3005 arguments: '(true,42)',
2459 type: 'Class', 3006 type: 'Class',
2460 selector: 'CallStructure(arity=2)')), 3007 selector: 'CallStructure(arity=2)')),
2461 const Test(
2462 '''
2463 class Class {}
2464 m() => const Class();
2465 ''',
2466 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
2467 arguments: '()',
2468 type: 'Class',
2469 selector: 'CallStructure(arity=0)')),
2470 const Test(
2471 '''
2472 class Class {
2473 const Class() // Delibrate syntax error.
2474 }
2475 m() => const Class();
2476 ''',
2477 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
2478 arguments: '()',
2479 type: 'dynamic',
2480 selector: 'CallStructure(arity=0)')),
2481 const Test(
2482 '''
2483 class Target {}
2484 class Class {
2485 const factory Class() = Target;
2486 }
2487 m() => const Class();
2488 ''',
2489 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
2490 arguments: '()',
2491 type: 'Class',
2492 selector: 'CallStructure(arity=0)')),
2493 /* Enable this when constness is handled consistently.
2494 const Test(
2495 '''
2496 class Target {
2497 const Target();
2498 }
2499 class Redirection {
2500 factory Redirection() = Target;
2501 }
2502 class Class {
2503 const factory Class() = Redirection;
2504 }
2505 m() => const Class();
2506 ''',
2507 const Visit(VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
2508 arguments: '()',
2509 type: 'Class',
2510 selector: 'CallStructure(arity=0)')),
2511 */
2512 ], 3008 ],
2513 }; 3009 };
2514 3010
2515 const Map<String, List<Test>> DECL_TESTS = const { 3011 const Map<String, List<Test>> DECL_TESTS = const {
2516 'Function declarations': const [ 3012 'Function declarations': const [
2517 const Test( 3013 const Test(
2518 ''' 3014 '''
2519 m(a, b) {} 3015 m(a, b) {}
2520 ''', 3016 ''',
2521 const [ 3017 const [
(...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
3325 const m = 42; 3821 const m = 42;
3326 ''', 3822 ''',
3327 const [ 3823 const [
3328 const Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL, 3824 const Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL,
3329 element: 'field(m)', 3825 element: 'field(m)',
3330 constant: 42), 3826 constant: 42),
3331 ]), 3827 ]),
3332 ], 3828 ],
3333 }; 3829 };
3334 3830
3831 const List<VisitKind> UNTESTABLE_KINDS = const <VisitKind>[
3832 VisitKind.VISIT_STATIC_METHOD_SETTER_COMPOUND,
3833 VisitKind.VISIT_STATIC_METHOD_SETTER_PREFIX,
3834 VisitKind.VISIT_STATIC_METHOD_SETTER_POSTFIX,
3835 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
3836 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
3837 VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
3838 VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND,
3839 VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX,
3840 VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX,
3841 VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND,
3842 VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX,
3843 VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX,
3844 VisitKind.VISIT_SUPER_NOT_EQUALS,
3845 VisitKind.VISIT_CLASS_TYPE_LITERAL_SET,
3846 VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_SET,
3847 VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
3848 VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
3849 ];
3850
3335 main(List<String> arguments) { 3851 main(List<String> arguments) {
3852 Set<VisitKind> kinds = new Set<VisitKind>.from(VisitKind.values);
3336 asyncTest(() => Future.forEach([ 3853 asyncTest(() => Future.forEach([
3337 () { 3854 () {
3338 return test( 3855 return test(
3856 kinds,
3339 arguments, 3857 arguments,
3340 SEND_TESTS, 3858 SEND_TESTS,
3341 (elements) => new SemanticSendTestVisitor(elements)); 3859 (elements) => new SemanticSendTestVisitor(elements));
3342 }, 3860 },
3343 () { 3861 () {
3344 return test( 3862 return test(
3863 kinds,
3345 arguments, 3864 arguments,
3346 DECL_TESTS, 3865 DECL_TESTS,
3347 (elements) => new SemanticDeclarationTestVisitor(elements)); 3866 (elements) => new SemanticDeclarationTestVisitor(elements));
3348 }, 3867 },
3868 () {
3869 Set<VisitKind> unvisitedKindSet =
3870 kinds.toSet()..removeAll(UNTESTABLE_KINDS);
3871 List<VisitKind> unvisitedKindList = unvisitedKindSet.toList();
3872 unvisitedKindList..sort((a, b) => a.index.compareTo(b.index));
3873
3874 Expect.isTrue(unvisitedKindList.isEmpty,
3875 "Untested visit kinds:\n ${unvisitedKindList.join(',\n ')},\n");
3876
3877 Set<VisitKind> testedUntestableKinds =
3878 UNTESTABLE_KINDS.toSet()..removeAll(kinds);
3879 Expect.isTrue(testedUntestableKinds.isEmpty,
3880 "Tested untestable visit kinds (remove from UNTESTABLE_KINDS):\n "
3881 "${testedUntestableKinds.join(',\n ')},\n");
3882 },
3883 () {
3884 ClassMirror mirror1 = reflectType(SemanticSendTestVisitor);
3885 Set<Symbol> symbols1 = mirror1.declarations.keys.toSet();
3886 ClassMirror mirror2 = reflectType(SemanticSendVisitor);
3887 Set<Symbol> symbols2 =
3888 mirror2.declarations.values
3889 .where((m) => m is MethodMirror &&
3890 !m.isConstructor &&
3891 m.simpleName != #apply)
3892 .map((m) => m.simpleName).toSet();
3893 symbols2.removeAll(symbols1);
3894 print("Untested visit methods:\n ${symbols2.join(',\n ')},\n");
3895 }
3349 ], (f) => f())); 3896 ], (f) => f()));
3350 } 3897 }
3351 3898
3352 Future test(List<String> arguments, 3899 Future test(Set<VisitKind> unvisitedKinds,
3900 List<String> arguments,
3353 Map<String, List<Test>> TESTS, 3901 Map<String, List<Test>> TESTS,
3354 SemanticTestVisitor createVisitor(TreeElements elements)) { 3902 SemanticTestVisitor createVisitor(TreeElements elements)) {
3355 Map<String, String> sourceFiles = {}; 3903 Map<String, String> sourceFiles = {};
3356 Map<String, Test> testMap = {}; 3904 Map<String, Test> testMap = {};
3357 StringBuffer mainSource = new StringBuffer(); 3905 StringBuffer mainSource = new StringBuffer();
3358 int index = 0; 3906 int index = 0;
3359 TESTS.forEach((String group, List<Test> tests) { 3907 TESTS.forEach((String group, List<Test> tests) {
3360 if (arguments.isNotEmpty && !arguments.contains(group)) return; 3908 if (arguments.isNotEmpty && !arguments.contains(group)) return;
3361 3909
3362 tests.forEach((Test test) { 3910 tests.forEach((Test test) {
3363 StringBuffer testSource = new StringBuffer(); 3911 StringBuffer testSource = new StringBuffer();
3364 if (test.codeByPrefix != null) { 3912 if (test.codeByPrefix != null) {
3365 String prefixFilename = 'pre$index.dart'; 3913 String prefixFilename = 'pre$index.dart';
3366 sourceFiles[prefixFilename] = test.codeByPrefix; 3914 sourceFiles[prefixFilename] = test.codeByPrefix;
3367 testSource.writeln("import '$prefixFilename' as p;"); 3915 testSource.writeln("import '$prefixFilename' as p;");
3368 } 3916 }
3369 3917
3370 String filename = 'lib$index.dart'; 3918 String filename = 'lib$index.dart';
3371 testSource.writeln(test.code); 3919 testSource.writeln(test.code);
3372 sourceFiles[filename] = testSource.toString(); 3920 sourceFiles[filename] = testSource.toString();
3373 mainSource.writeln("import '$filename';"); 3921 mainSource.writeln("import '$filename';");
3374 testMap[filename] = test; 3922 testMap[filename] = test;
3375 index++; 3923 index++;
3376 }); 3924 });
3377 }); 3925 });
3378
3379 mainSource.writeln("main() {}"); 3926 mainSource.writeln("main() {}");
3380 sourceFiles['main.dart'] = mainSource.toString(); 3927 sourceFiles['main.dart'] = mainSource.toString();
3381 3928
3382 Compiler compiler = compilerFor(sourceFiles, 3929 Compiler compiler = compilerFor(sourceFiles,
3383 options: ['--analyze-all', '--analyze-only']); 3930 options: ['--analyze-all', '--analyze-only']);
3384 return compiler.run(Uri.parse('memory:main.dart')).then((_) { 3931 return compiler.run(Uri.parse('memory:main.dart')).then((_) {
3385 testMap.forEach((String filename, Test test) { 3932 testMap.forEach((String filename, Test test) {
3386 LibraryElement library = compiler.libraryLoader.lookupLibrary( 3933 LibraryElement library = compiler.libraryLoader.lookupLibrary(
3387 Uri.parse('memory:$filename')); 3934 Uri.parse('memory:$filename'));
3388 var expectedVisits = test.expectedVisits; 3935 var expectedVisits = test.expectedVisits;
(...skipping 23 matching lines...) Expand all
3412 //print(resolvedAst.node.toDebugString()); 3959 //print(resolvedAst.node.toDebugString());
3413 resolvedAst.node.accept(visitor); 3960 resolvedAst.node.accept(visitor);
3414 }); 3961 });
3415 } catch (e, s) { 3962 } catch (e, s) {
3416 Expect.fail("$e:\n$s\nIn test:\n" 3963 Expect.fail("$e:\n$s\nIn test:\n"
3417 "${library.compilationUnit.script.text}"); 3964 "${library.compilationUnit.script.text}");
3418 } 3965 }
3419 Expect.listEquals(expectedVisits, visitor.visits, 3966 Expect.listEquals(expectedVisits, visitor.visits,
3420 "In test:\n" 3967 "In test:\n"
3421 "${library.compilationUnit.script.text}"); 3968 "${library.compilationUnit.script.text}");
3969 unvisitedKinds.removeAll(visitor.visits.map((visit) => visit.method));
3422 } 3970 }
3423 if (element.isAbstractField) { 3971 if (element.isAbstractField) {
3424 AbstractFieldElement abstractFieldElement = element; 3972 AbstractFieldElement abstractFieldElement = element;
3425 if (abstractFieldElement.getter != null) { 3973 if (abstractFieldElement.getter != null) {
3426 testAstElement(abstractFieldElement.getter); 3974 testAstElement(abstractFieldElement.getter);
3427 } else if (abstractFieldElement.setter != null) { 3975 } else if (abstractFieldElement.setter != null) {
3428 testAstElement(abstractFieldElement.setter); 3976 testAstElement(abstractFieldElement.setter);
3429 } 3977 }
3430 } else { 3978 } else {
3431 testAstElement(element); 3979 testAstElement(element);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
3464 @override 4012 @override
3465 visitAssert( 4013 visitAssert(
3466 Send node, 4014 Send node,
3467 Node expression, 4015 Node expression,
3468 arg) { 4016 arg) {
3469 visits.add(new Visit(VisitKind.VISIT_ASSERT, expression: expression)); 4017 visits.add(new Visit(VisitKind.VISIT_ASSERT, expression: expression));
3470 apply(expression, arg); 4018 apply(expression, arg);
3471 } 4019 }
3472 4020
3473 @override 4021 @override
3474 errorInvalidAssert(
3475 Send node,
3476 NodeList arguments,
3477 arg) {
3478 // TODO: implement errorAssert
3479 }
3480
3481 @override
3482 visitBinary( 4022 visitBinary(
3483 Send node, 4023 Send node,
3484 Node left, 4024 Node left,
3485 BinaryOperator operator, 4025 BinaryOperator operator,
3486 Node right, 4026 Node right,
3487 arg) { 4027 arg) {
3488 visits.add(new Visit(VisitKind.VISIT_BINARY, 4028 visits.add(new Visit(VisitKind.VISIT_BINARY,
3489 left: left, operator: operator, right: right)); 4029 left: left, operator: operator, right: right));
3490 apply(left, arg); 4030 apply(left, arg);
3491 apply(right, arg); 4031 apply(right, arg);
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
3896 Send node, 4436 Send node,
3897 Element element, 4437 Element element,
3898 BinaryOperator operator, 4438 BinaryOperator operator,
3899 Node argument, 4439 Node argument,
3900 arg) { 4440 arg) {
3901 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_BINARY, 4441 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_BINARY,
3902 operator: operator, right: argument)); 4442 operator: operator, right: argument));
3903 apply(argument, arg); 4443 apply(argument, arg);
3904 } 4444 }
3905 4445
3906
3907 @override 4446 @override
3908 visitSuperIndex( 4447 visitSuperIndex(
3909 Send node, 4448 Send node,
3910 FunctionElement function, 4449 FunctionElement function,
3911 Node index, 4450 Node index,
3912 arg) { 4451 arg) {
3913 visits.add(new Visit(VisitKind.VISIT_SUPER_INDEX, 4452 visits.add(new Visit(VisitKind.VISIT_SUPER_INDEX,
3914 element: function, index: index)); 4453 element: function, index: index));
3915 apply(index, arg); 4454 apply(index, arg);
3916 } 4455 }
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
4340 Node index, 4879 Node index,
4341 Node rhs, 4880 Node rhs,
4342 arg) { 4881 arg) {
4343 visits.add(new Visit(VisitKind.VISIT_SUPER_INDEX_SET, 4882 visits.add(new Visit(VisitKind.VISIT_SUPER_INDEX_SET,
4344 element: function, index: index, rhs: rhs)); 4883 element: function, index: index, rhs: rhs));
4345 apply(index, arg); 4884 apply(index, arg);
4346 apply(rhs, arg); 4885 apply(rhs, arg);
4347 } 4886 }
4348 4887
4349 @override 4888 @override
4350 errorFinalLocalVariableSet(
4351 SendSet node,
4352 LocalVariableElement variable,
4353 Node rhs,
4354 arg) {
4355 // TODO: implement errorFinalLocalVariableSet
4356 }
4357
4358 @override
4359 errorFinalParameterSet(
4360 SendSet node,
4361 ParameterElement parameter,
4362 Node rhs,
4363 arg) {
4364 // TODO: implement errorFinalParameterSet
4365 }
4366
4367 @override
4368 errorFinalStaticFieldSet(
4369 SendSet node,
4370 FieldElement field,
4371 Node rhs,
4372 arg) {
4373 // TODO: implement errorFinalStaticFieldSet
4374 }
4375
4376 @override
4377 errorFinalSuperFieldSet(
4378 SendSet node,
4379 FieldElement field,
4380 Node rhs,
4381 arg) {
4382 // TODO: implement errorFinalSuperFieldSet
4383 }
4384
4385 @override
4386 errorFinalTopLevelFieldSet(
4387 SendSet node,
4388 FieldElement field,
4389 Node rhs,
4390 arg) {
4391 // TODO: implement errorFinalTopLevelFieldSet
4392 }
4393
4394 @override
4395 errorLocalFunctionSet(
4396 SendSet node,
4397 LocalFunctionElement function,
4398 Node rhs,
4399 arg) {
4400 // TODO: implement errorLocalFunctionSet
4401 }
4402
4403 @override
4404 errorStaticFunctionSet(
4405 Send node,
4406 MethodElement function,
4407 Node rhs,
4408 arg) {
4409 // TODO: implement errorStaticFunctionSet
4410 }
4411
4412 @override
4413 errorStaticGetterSet(
4414 SendSet node,
4415 FunctionElement getter,
4416 Node rhs,
4417 arg) {
4418 // TODO: implement errorStaticGetterSet
4419 }
4420
4421 @override
4422 errorStaticSetterGet(
4423 Send node,
4424 FunctionElement setter,
4425 arg) {
4426 // TODO: implement errorStaticSetterGet
4427 }
4428
4429 @override
4430 errorStaticSetterInvoke(
4431 Send node,
4432 FunctionElement setter,
4433 NodeList arguments,
4434 CallStructure callStructure,
4435 arg) {
4436 // TODO: implement errorStaticSetterInvoke
4437 }
4438
4439 @override
4440 errorSuperGetterSet(
4441 SendSet node,
4442 FunctionElement getter,
4443 Node rhs,
4444 arg) {
4445 // TODO: implement errorSuperGetterSet
4446 }
4447
4448 @override
4449 errorSuperMethodSet(
4450 Send node,
4451 MethodElement method,
4452 Node rhs,
4453 arg) {
4454 // TODO: implement errorSuperMethodSet
4455 }
4456
4457 @override
4458 errorSuperSetterGet(
4459 Send node,
4460 FunctionElement setter,
4461 arg) {
4462 // TODO: implement errorSuperSetterGet
4463 }
4464
4465 @override
4466 errorSuperSetterInvoke(
4467 Send node,
4468 FunctionElement setter,
4469 NodeList arguments,
4470 CallStructure callStructure,
4471 arg) {
4472 // TODO: implement errorSuperSetterInvoke
4473 }
4474
4475 @override
4476 errorTopLevelFunctionSet(
4477 Send node,
4478 MethodElement function,
4479 Node rhs,
4480 arg) {
4481 // TODO: implement errorTopLevelFunctionSet
4482 }
4483
4484 @override
4485 errorTopLevelGetterSet(
4486 SendSet node,
4487 FunctionElement getter,
4488 Node rhs,
4489 arg) {
4490 // TODO: implement errorTopLevelGetterSet
4491 }
4492
4493 @override
4494 errorTopLevelSetterGet(
4495 Send node,
4496 FunctionElement setter,
4497 arg) {
4498 // TODO: implement errorTopLevelSetterGet
4499 }
4500
4501 @override
4502 errorTopLevelSetterInvoke(
4503 Send node,
4504 FunctionElement setter,
4505 NodeList arguments,
4506 CallStructure callStructure,
4507 arg) {
4508 // TODO: implement errorTopLevelSetterInvoke
4509 }
4510
4511 @override
4512 visitDynamicPropertyCompound( 4889 visitDynamicPropertyCompound(
4513 Send node, 4890 Send node,
4514 Node receiver, 4891 Node receiver,
4515 AssignmentOperator operator, 4892 AssignmentOperator operator,
4516 Node rhs, 4893 Node rhs,
4517 Selector getterSelector, 4894 Selector getterSelector,
4518 Selector setterSelector, 4895 Selector setterSelector,
4519 arg) { 4896 arg) {
4520 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND, 4897 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_PROPERTY_COMPOUND,
4521 receiver: receiver, operator: operator, rhs: rhs, 4898 receiver: receiver, operator: operator, rhs: rhs,
4522 getter: getterSelector, setter: setterSelector)); 4899 getter: getterSelector, setter: setterSelector));
4523 apply(receiver, arg); 4900 apply(receiver, arg);
4524 apply(rhs, arg); 4901 apply(rhs, arg);
4525 } 4902 }
4526 4903
4527 @override 4904 @override
4528 errorFinalLocalVariableCompound( 4905 visitFinalLocalVariableCompound(
4529 Send node, 4906 Send node,
4530 LocalVariableElement variable, 4907 LocalVariableElement variable,
4531 AssignmentOperator operator, 4908 AssignmentOperator operator,
4532 Node rhs, 4909 Node rhs,
4533 arg) { 4910 arg) {
4534 // TODO: implement errorFinalLocalVariableCompound 4911 visits.add(new Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_COMPOUND,
4912 element: variable, operator: operator, rhs: rhs));
4913 apply(rhs, arg);
4535 } 4914 }
4536 4915
4537 @override 4916 @override
4538 errorFinalParameterCompound( 4917 visitFinalLocalVariablePrefix(
4918 Send node,
4919 LocalVariableElement variable,
4920 IncDecOperator operator,
4921 arg) {
4922 visits.add(new Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_PREFIX,
4923 element: variable, operator: operator));
4924 }
4925
4926 @override
4927 visitFinalLocalVariablePostfix(
4928 Send node,
4929 LocalVariableElement variable,
4930 IncDecOperator operator,
4931 arg) {
4932 visits.add(new Visit(VisitKind.VISIT_FINAL_LOCAL_VARIABLE_POSTFIX,
4933 element: variable, operator: operator));
4934 }
4935
4936 @override
4937 visitFinalParameterCompound(
4539 Send node, 4938 Send node,
4540 ParameterElement parameter, 4939 ParameterElement parameter,
4541 AssignmentOperator operator, 4940 AssignmentOperator operator,
4542 Node rhs, 4941 Node rhs,
4543 arg) { 4942 arg) {
4544 // TODO: implement errorFinalParameterCompound 4943 visits.add(new Visit(VisitKind.VISIT_FINAL_PARAMETER_COMPOUND,
4944 element: parameter, operator: operator, rhs: rhs));
4945 apply(rhs, arg);
4545 } 4946 }
4546 4947
4547 @override 4948 @override
4548 errorFinalStaticFieldCompound( 4949 visitFinalParameterPrefix(
4950 Send node,
4951 ParameterElement parameter,
4952 IncDecOperator operator,
4953 arg) {
4954 visits.add(new Visit(VisitKind.VISIT_FINAL_PARAMETER_PREFIX,
4955 element: parameter, operator: operator));
4956 }
4957
4958 @override
4959 visitFinalParameterPostfix(
4960 Send node,
4961 ParameterElement parameter,
4962 IncDecOperator operator,
4963 arg) {
4964 visits.add(new Visit(VisitKind.VISIT_FINAL_PARAMETER_POSTFIX,
4965 element: parameter, operator: operator));
4966 }
4967
4968 @override
4969 visitFinalStaticFieldCompound(
4549 Send node, 4970 Send node,
4550 FieldElement field, 4971 FieldElement field,
4551 AssignmentOperator operator, 4972 AssignmentOperator operator,
4552 Node rhs, 4973 Node rhs,
4553 arg) { 4974 arg) {
4554 // TODO: implement errorFinalStaticFieldCompound 4975 visits.add(new Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_COMPOUND,
4976 element: field, operator: operator, rhs: rhs));
4977 apply(rhs, arg);
4555 } 4978 }
4556 4979
4557 @override 4980 @override
4558 errorFinalSuperFieldCompound( 4981 visitFinalStaticFieldPostfix(
4982 Send node,
4983 FieldElement field,
4984 IncDecOperator operator,
4985 arg) {
4986 visits.add(new Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_POSTFIX,
4987 element: field, operator: operator));
4988 }
4989
4990 @override
4991 visitFinalStaticFieldPrefix(
4992 Send node,
4993 FieldElement field,
4994 IncDecOperator operator,
4995 arg) {
4996 visits.add(new Visit(VisitKind.VISIT_STATIC_FINAL_FIELD_PREFIX,
4997 element: field, operator: operator));
4998 }
4999
5000 @override
5001 visitFinalSuperFieldCompound(
4559 Send node, 5002 Send node,
4560 FieldElement field, 5003 FieldElement field,
4561 AssignmentOperator operator, 5004 AssignmentOperator operator,
4562 Node rhs, 5005 Node rhs,
4563 arg) { 5006 arg) {
4564 // TODO: implement errorFinalSuperFieldCompound 5007 visits.add(new Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_COMPOUND,
5008 element: field, operator: operator, rhs: rhs));
5009 apply(rhs, arg);
4565 } 5010 }
4566 5011
4567 @override 5012 @override
4568 errorFinalTopLevelFieldCompound( 5013 visitFinalTopLevelFieldCompound(
4569 Send node, 5014 Send node,
4570 FieldElement field, 5015 FieldElement field,
4571 AssignmentOperator operator, 5016 AssignmentOperator operator,
4572 Node rhs, 5017 Node rhs,
4573 arg) { 5018 arg) {
4574 // TODO: implement errorFinalTopLevelFieldCompound 5019 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND,
5020 element: field, operator: operator, rhs: rhs));
5021 apply(rhs, arg);
4575 } 5022 }
4576 5023
4577 @override 5024 @override
4578 errorLocalFunctionCompound( 5025 visitFinalTopLevelFieldPostfix(
5026 Send node,
5027 FieldElement field,
5028 IncDecOperator operator,
5029 arg) {
5030 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX,
5031 element: field, operator: operator));
5032 }
5033
5034 @override
5035 visitFinalTopLevelFieldPrefix(
5036 Send node,
5037 FieldElement field,
5038 IncDecOperator operator,
5039 arg) {
5040 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX,
5041 element: field, operator: operator));
5042 }
5043
5044 @override
5045 visitLocalFunctionCompound(
4579 Send node, 5046 Send node,
4580 LocalFunctionElement function, 5047 LocalFunctionElement function,
4581 AssignmentOperator operator, 5048 AssignmentOperator operator,
4582 Node rhs, 5049 Node rhs,
4583 arg) { 5050 arg) {
4584 // TODO: implement errorLocalFunctionCompound 5051 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_COMPOUND,
5052 element: function, operator: operator, rhs: rhs));
5053 apply(rhs, arg);
4585 } 5054 }
4586 5055
4587 @override 5056 @override
4588 visitLocalVariableCompound( 5057 visitLocalVariableCompound(
4589 Send node, 5058 Send node,
4590 LocalVariableElement variable, 5059 LocalVariableElement variable,
4591 AssignmentOperator operator, 5060 AssignmentOperator operator,
4592 Node rhs, 5061 Node rhs,
4593 arg) { 5062 arg) {
4594 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_COMPOUND, 5063 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_COMPOUND,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
4743 } 5212 }
4744 5213
4745 @override 5214 @override
4746 visitSuperMethodSetterCompound( 5215 visitSuperMethodSetterCompound(
4747 Send node, 5216 Send node,
4748 FunctionElement method, 5217 FunctionElement method,
4749 FunctionElement setter, 5218 FunctionElement setter,
4750 AssignmentOperator operator, 5219 AssignmentOperator operator,
4751 Node rhs, 5220 Node rhs,
4752 arg) { 5221 arg) {
4753 // TODO: implement visitSuperMethodSetterCompound 5222 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SETTER_COMPOUND,
5223 getter: method, setter: setter, operator: operator, rhs: rhs));
5224 apply(rhs, arg);
4754 } 5225 }
4755 5226
4756 @override 5227 @override
5228 visitSuperMethodCompound(
5229 Send node,
5230 FunctionElement method,
5231 AssignmentOperator operator,
5232 Node rhs,
5233 arg) {
5234 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_COMPOUND,
5235 element: method, operator: operator, rhs: rhs));
5236 apply(rhs, arg);
5237 }
5238
5239 @override
5240 visitSuperMethodPrefix(
5241 Send node,
5242 FunctionElement method,
5243 IncDecOperator operator,
5244 arg) {
5245 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_PREFIX,
5246 element: method, operator: operator));
5247 }
5248
5249 @override
5250 visitSuperMethodPostfix(
5251 Send node,
5252 FunctionElement method,
5253 IncDecOperator operator,
5254 arg) {
5255 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_POSTFIX,
5256 element: method, operator: operator));
5257 }
5258
5259 @override
5260 visitUnresolvedSuperCompound(
5261 Send node,
5262 Element element,
5263 AssignmentOperator operator,
5264 Node rhs,
5265 arg) {
5266 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_COMPOUND,
5267 operator: operator, rhs: rhs));
5268 apply(rhs, arg);
5269 }
5270
5271 @override
5272 visitUnresolvedSuperPrefix(
5273 Send node,
5274 Element element,
5275 IncDecOperator operator,
5276 arg) {
5277 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_PREFIX,
5278 operator: operator));
5279 }
5280
5281 @override
5282 visitUnresolvedSuperPostfix(
5283 Send node,
5284 Element element,
5285 IncDecOperator operator,
5286 arg) {
5287 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_POSTFIX,
5288 operator: operator));
5289 }
5290
5291 @override
4757 visitTopLevelMethodSetterCompound( 5292 visitTopLevelMethodSetterCompound(
4758 Send node, 5293 Send node,
4759 FunctionElement method, 5294 FunctionElement method,
4760 FunctionElement setter, 5295 FunctionElement setter,
4761 AssignmentOperator operator, 5296 AssignmentOperator operator,
4762 Node rhs, 5297 Node rhs,
4763 arg) { 5298 arg) {
4764 // TODO: implement visitTopLevelMethodSetterCompound 5299 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
5300 getter: method, setter: setter, operator: operator, rhs: rhs));
5301 apply(rhs, arg);
4765 } 5302 }
4766 5303
4767 @override 5304 @override
4768 visitCompoundIndexSet( 5305 visitCompoundIndexSet(
4769 Send node, 5306 Send node,
4770 Node receiver, 5307 Node receiver,
4771 Node index, 5308 Node index,
4772 AssignmentOperator operator, 5309 AssignmentOperator operator,
4773 Node rhs, 5310 Node rhs,
4774 arg) { 5311 arg) {
(...skipping 14 matching lines...) Expand all
4789 Node rhs, 5326 Node rhs,
4790 arg) { 5327 arg) {
4791 visits.add(new Visit(VisitKind.VISIT_SUPER_COMPOUND_INDEX_SET, 5328 visits.add(new Visit(VisitKind.VISIT_SUPER_COMPOUND_INDEX_SET,
4792 getter: getter, setter: setter, 5329 getter: getter, setter: setter,
4793 index: index, rhs: rhs, operator: operator)); 5330 index: index, rhs: rhs, operator: operator));
4794 apply(index, arg); 5331 apply(index, arg);
4795 apply(rhs, arg); 5332 apply(rhs, arg);
4796 } 5333 }
4797 5334
4798 @override 5335 @override
4799 errorClassTypeLiteralCompound( 5336 visitClassTypeLiteralCompound(
4800 Send node, 5337 Send node,
4801 ConstantExpression constant, 5338 ConstantExpression constant,
4802 AssignmentOperator operator, 5339 AssignmentOperator operator,
4803 Node rhs, 5340 Node rhs,
4804 arg) { 5341 arg) {
4805 visits.add(new Visit(VisitKind.ERROR_CLASS_TYPE_LITERAL_COMPOUND, 5342 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_COMPOUND,
4806 constant: constant.getText(), operator: operator, rhs: rhs)); 5343 constant: constant.getText(), operator: operator, rhs: rhs));
4807 apply(rhs, arg); 5344 apply(rhs, arg);
4808 } 5345 }
4809 5346
4810 @override 5347 @override
4811 errorDynamicTypeLiteralCompound( 5348 visitDynamicTypeLiteralCompound(
4812 Send node, 5349 Send node,
4813 ConstantExpression constant, 5350 ConstantExpression constant,
4814 AssignmentOperator operator, 5351 AssignmentOperator operator,
4815 Node rhs, 5352 Node rhs,
4816 arg) { 5353 arg) {
4817 visits.add(new Visit(VisitKind.ERROR_DYNAMIC_TYPE_LITERAL_COMPOUND, 5354 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
4818 constant: constant.getText(), operator: operator, rhs: rhs)); 5355 constant: constant.getText(), operator: operator, rhs: rhs));
4819 apply(rhs, arg); 5356 apply(rhs, arg);
4820 } 5357 }
4821 5358
4822 @override 5359 @override
4823 errorTypeVariableTypeLiteralCompound( 5360 visitTypeVariableTypeLiteralCompound(
4824 Send node, 5361 Send node,
4825 TypeVariableElement element, 5362 TypeVariableElement element,
4826 AssignmentOperator operator, 5363 AssignmentOperator operator,
4827 Node rhs, 5364 Node rhs,
4828 arg) { 5365 arg) {
4829 visits.add(new Visit(VisitKind.ERROR_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND, 5366 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND,
4830 element: element, operator: operator, rhs: rhs)); 5367 element: element, operator: operator, rhs: rhs));
4831 apply(rhs, arg); 5368 apply(rhs, arg);
4832 } 5369 }
4833 5370
4834 @override 5371 @override
4835 errorTypedefTypeLiteralCompound( 5372 visitTypedefTypeLiteralCompound(
4836 Send node, 5373 Send node,
4837 ConstantExpression constant, 5374 ConstantExpression constant,
4838 AssignmentOperator operator, 5375 AssignmentOperator operator,
4839 Node rhs, 5376 Node rhs,
4840 arg) { 5377 arg) {
4841 visits.add(new Visit(VisitKind.ERROR_TYPEDEF_TYPE_LITERAL_COMPOUND, 5378 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
4842 constant: constant.getText(), operator: operator, rhs: rhs)); 5379 constant: constant.getText(), operator: operator, rhs: rhs));
4843 apply(rhs, arg); 5380 apply(rhs, arg);
4844 } 5381 }
4845 5382
4846 @override 5383 @override
4847 errorLocalFunctionPrefix( 5384 visitLocalFunctionPrefix(
4848 Send node, 5385 Send node,
4849 LocalFunctionElement function, 5386 LocalFunctionElement function,
4850 IncDecOperator operator, 5387 IncDecOperator operator,
4851 arg) { 5388 arg) {
4852 // TODO: implement errorLocalFunctionPrefix 5389 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_PREFIX,
5390 element: function, operator: operator));
4853 } 5391 }
4854 5392
4855 @override 5393 @override
4856 errorClassTypeLiteralPrefix( 5394 visitClassTypeLiteralPrefix(
4857 Send node, 5395 Send node,
4858 ConstantExpression constant, 5396 ConstantExpression constant,
4859 IncDecOperator operator, 5397 IncDecOperator operator,
4860 arg) { 5398 arg) {
4861 visits.add(new Visit(VisitKind.ERROR_CLASS_TYPE_LITERAL_PREFIX, 5399 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_PREFIX,
4862 constant: constant.getText(), operator: operator)); 5400 constant: constant.getText(), operator: operator));
4863 } 5401 }
4864 5402
4865 @override 5403 @override
4866 errorDynamicTypeLiteralPrefix( 5404 visitDynamicTypeLiteralPrefix(
4867 Send node, 5405 Send node,
4868 ConstantExpression constant, 5406 ConstantExpression constant,
4869 IncDecOperator operator, 5407 IncDecOperator operator,
4870 arg) { 5408 arg) {
4871 visits.add(new Visit(VisitKind.ERROR_DYNAMIC_TYPE_LITERAL_PREFIX, 5409 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_PREFIX,
4872 constant: constant.getText(), operator: operator)); 5410 constant: constant.getText(), operator: operator));
4873 } 5411 }
4874 5412
4875 @override 5413 @override
4876 visitLocalVariablePrefix( 5414 visitLocalVariablePrefix(
4877 Send node, 5415 Send node,
4878 LocalVariableElement variable, 5416 LocalVariableElement variable,
4879 IncDecOperator operator, 5417 IncDecOperator operator,
4880 arg) { 5418 arg) {
4881 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_PREFIX, 5419 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_PREFIX,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 getter: getter, setter: setter, operator: operator)); 5451 getter: getter, setter: setter, operator: operator));
4914 } 5452 }
4915 5453
4916 @override 5454 @override
4917 visitStaticMethodSetterPrefix( 5455 visitStaticMethodSetterPrefix(
4918 Send node, 5456 Send node,
4919 FunctionElement getter, 5457 FunctionElement getter,
4920 FunctionElement setter, 5458 FunctionElement setter,
4921 IncDecOperator operator, 5459 IncDecOperator operator,
4922 arg) { 5460 arg) {
4923 // TODO: implement visitStaticMethodSetterPrefix 5461 visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_PREFIX,
5462 getter: getter, setter: setter, operator: operator));
4924 } 5463 }
4925 5464
4926 @override 5465 @override
5466 visitSuperFieldFieldCompound(
5467 Send node,
5468 FieldElement readField,
5469 FieldElement writtenField,
5470 AssignmentOperator operator,
5471 Node rhs,
5472 arg) {
5473 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_COMPOUND,
5474 getter: readField, setter: writtenField, operator: operator, rhs: rhs));
5475 apply(rhs, arg);
5476 }
5477
5478 @override
4927 visitSuperFieldFieldPrefix( 5479 visitSuperFieldFieldPrefix(
4928 Send node, 5480 Send node,
4929 FieldElement readField, 5481 FieldElement readField,
4930 FieldElement writtenField, 5482 FieldElement writtenField,
4931 IncDecOperator operator, 5483 IncDecOperator operator,
4932 arg) { 5484 arg) {
4933 // TODO: implement visitSuperFieldFieldPrefix 5485 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_PREFIX,
5486 getter: readField, setter: writtenField, operator: operator));
4934 } 5487 }
4935 5488
4936 @override 5489 @override
4937 visitSuperFieldPrefix( 5490 visitSuperFieldPrefix(
4938 Send node, 5491 Send node,
4939 FieldElement field, 5492 FieldElement field,
4940 IncDecOperator operator, 5493 IncDecOperator operator,
4941 arg) { 5494 arg) {
4942 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_PREFIX, 5495 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_PREFIX,
4943 element: field, operator: operator)); 5496 element: field, operator: operator));
4944 } 5497 }
4945 5498
4946 @override 5499 @override
5500 visitFinalSuperFieldPrefix(
5501 Send node,
5502 FieldElement field,
5503 IncDecOperator operator,
5504 arg) {
5505 visits.add(new Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_PREFIX,
5506 element: field, operator: operator));
5507 }
5508
5509 @override
4947 visitSuperFieldSetterPrefix( 5510 visitSuperFieldSetterPrefix(
4948 Send node, 5511 Send node,
4949 FieldElement field, 5512 FieldElement field,
4950 FunctionElement setter, 5513 FunctionElement setter,
4951 IncDecOperator operator, 5514 IncDecOperator operator,
4952 arg) { 5515 arg) {
4953 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_PREFIX, 5516 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_PREFIX,
4954 getter: field, setter: setter, operator: operator)); 5517 getter: field, setter: setter, operator: operator));
4955 } 5518 }
4956 5519
(...skipping 19 matching lines...) Expand all
4976 getter: getter, setter: setter, operator: operator)); 5539 getter: getter, setter: setter, operator: operator));
4977 } 5540 }
4978 5541
4979 @override 5542 @override
4980 visitSuperMethodSetterPrefix( 5543 visitSuperMethodSetterPrefix(
4981 Send node, 5544 Send node,
4982 FunctionElement method, 5545 FunctionElement method,
4983 FunctionElement setter, 5546 FunctionElement setter,
4984 IncDecOperator operator, 5547 IncDecOperator operator,
4985 arg) { 5548 arg) {
4986 // TODO: implement visitSuperMethodSetterPrefix 5549 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SETTER_PREFIX,
5550 getter: method, setter: setter, operator: operator));
4987 } 5551 }
4988 5552
4989 @override 5553 @override
4990 visitThisPropertyPrefix( 5554 visitThisPropertyPrefix(
4991 Send node, 5555 Send node,
4992 IncDecOperator operator, 5556 IncDecOperator operator,
4993 Selector getterSelector, 5557 Selector getterSelector,
4994 Selector setterSelector, 5558 Selector setterSelector,
4995 arg) { 5559 arg) {
4996 visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_PREFIX, 5560 visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_PREFIX,
(...skipping 22 matching lines...) Expand all
5019 getter: getter, setter: setter, operator: operator)); 5583 getter: getter, setter: setter, operator: operator));
5020 } 5584 }
5021 5585
5022 @override 5586 @override
5023 visitTopLevelMethodSetterPrefix( 5587 visitTopLevelMethodSetterPrefix(
5024 Send node, 5588 Send node,
5025 FunctionElement method, 5589 FunctionElement method,
5026 FunctionElement setter, 5590 FunctionElement setter,
5027 IncDecOperator operator, 5591 IncDecOperator operator,
5028 arg) { 5592 arg) {
5029 // TODO: implement visitTopLevelMethodSetterPrefix 5593 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
5594 getter: method, setter: setter, operator: operator));
5030 } 5595 }
5031 5596
5032 @override 5597 @override
5033 errorTypeVariableTypeLiteralPrefix( 5598 visitTypeVariableTypeLiteralPrefix(
5034 Send node, 5599 Send node,
5035 TypeVariableElement element, 5600 TypeVariableElement element,
5036 IncDecOperator operator, 5601 IncDecOperator operator,
5037 arg) { 5602 arg) {
5038 visits.add(new Visit(VisitKind.ERROR_TYPE_VARIABLE_TYPE_LITERAL_PREFIX, 5603 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_PREFIX,
5039 element: element, operator: operator)); 5604 element: element, operator: operator));
5040 } 5605 }
5041 5606
5042 @override 5607 @override
5043 errorTypedefTypeLiteralPrefix( 5608 visitTypedefTypeLiteralPrefix(
5044 Send node, 5609 Send node,
5045 ConstantExpression constant, 5610 ConstantExpression constant,
5046 IncDecOperator operator, 5611 IncDecOperator operator,
5047 arg) { 5612 arg) {
5048 visits.add(new Visit(VisitKind.ERROR_TYPEDEF_TYPE_LITERAL_PREFIX, 5613 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_PREFIX,
5049 constant: constant.getText(), operator: operator)); 5614 constant: constant.getText(), operator: operator));
5050 } 5615 }
5051 5616
5052 @override 5617 @override
5053 errorLocalFunctionPostfix( 5618 visitLocalFunctionPostfix(
5054 Send node, 5619 Send node,
5055 LocalFunctionElement function, 5620 LocalFunctionElement function,
5056 IncDecOperator operator, 5621 IncDecOperator operator,
5057 arg) { 5622 arg) {
5058 // TODO: implement errorLocalFunctionPostfix 5623 visits.add(new Visit(VisitKind.VISIT_LOCAL_FUNCTION_POSTFIX,
5624 element: function, operator: operator));
5059 } 5625 }
5060 5626
5061 @override 5627 @override
5062 errorClassTypeLiteralPostfix( 5628 visitClassTypeLiteralPostfix(
5063 Send node, 5629 Send node,
5064 ConstantExpression constant, 5630 ConstantExpression constant,
5065 IncDecOperator operator, 5631 IncDecOperator operator,
5066 arg) { 5632 arg) {
5067 visits.add(new Visit(VisitKind.ERROR_CLASS_TYPE_LITERAL_POSTFIX, 5633 visits.add(new Visit(VisitKind.VISIT_CLASS_TYPE_LITERAL_POSTFIX,
5068 constant: constant.getText(), operator: operator)); 5634 constant: constant.getText(), operator: operator));
5069 } 5635 }
5070 5636
5071 @override 5637 @override
5072 errorDynamicTypeLiteralPostfix( 5638 visitDynamicTypeLiteralPostfix(
5073 Send node, 5639 Send node,
5074 ConstantExpression constant, 5640 ConstantExpression constant,
5075 IncDecOperator operator, 5641 IncDecOperator operator,
5076 arg) { 5642 arg) {
5077 visits.add(new Visit(VisitKind.ERROR_DYNAMIC_TYPE_LITERAL_POSTFIX, 5643 visits.add(new Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_POSTFIX,
5078 constant: constant.getText(), operator: operator)); 5644 constant: constant.getText(), operator: operator));
5079 } 5645 }
5080 5646
5081 @override 5647 @override
5082 visitLocalVariablePostfix( 5648 visitLocalVariablePostfix(
5083 Send node, 5649 Send node,
5084 LocalVariableElement variable, 5650 LocalVariableElement variable,
5085 IncDecOperator operator, 5651 IncDecOperator operator,
5086 arg) { 5652 arg) {
5087 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_POSTFIX, 5653 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_POSTFIX,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
5119 getter: getter, setter: setter, operator: operator)); 5685 getter: getter, setter: setter, operator: operator));
5120 } 5686 }
5121 5687
5122 @override 5688 @override
5123 visitStaticMethodSetterPostfix( 5689 visitStaticMethodSetterPostfix(
5124 Send node, 5690 Send node,
5125 FunctionElement getter, 5691 FunctionElement getter,
5126 FunctionElement setter, 5692 FunctionElement setter,
5127 IncDecOperator operator, 5693 IncDecOperator operator,
5128 arg) { 5694 arg) {
5129 // TODO: implement visitStaticMethodSetterPostfix 5695 visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_SETTER_POSTFIX,
5696 getter: getter, setter: setter, operator: operator));
5130 } 5697 }
5131 5698
5132 @override 5699 @override
5133 visitSuperFieldFieldPostfix( 5700 visitSuperFieldFieldPostfix(
5134 Send node, 5701 Send node,
5135 FieldElement readField, 5702 FieldElement readField,
5136 FieldElement writtenField, 5703 FieldElement writtenField,
5137 IncDecOperator operator, 5704 IncDecOperator operator,
5138 arg) { 5705 arg) {
5139 // TODO: implement visitSuperFieldFieldPostfix 5706 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_FIELD_POSTFIX,
5707 getter: readField, setter: writtenField, operator: operator));
5140 } 5708 }
5141 5709
5142 @override 5710 @override
5143 visitSuperFieldPostfix( 5711 visitSuperFieldPostfix(
5144 Send node, 5712 Send node,
5145 FieldElement field, 5713 FieldElement field,
5146 IncDecOperator operator, 5714 IncDecOperator operator,
5147 arg) { 5715 arg) {
5148 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_POSTFIX, 5716 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_POSTFIX,
5149 element: field, operator: operator)); 5717 element: field, operator: operator));
5150 } 5718 }
5151 5719
5152 @override 5720 @override
5721 visitFinalSuperFieldPostfix(
5722 Send node,
5723 FieldElement field,
5724 IncDecOperator operator,
5725 arg) {
5726 visits.add(new Visit(VisitKind.VISIT_SUPER_FINAL_FIELD_POSTFIX,
5727 element: field, operator: operator));
5728 }
5729
5730 @override
5153 visitSuperFieldSetterPostfix( 5731 visitSuperFieldSetterPostfix(
5154 Send node, 5732 Send node,
5155 FieldElement field, 5733 FieldElement field,
5156 FunctionElement setter, 5734 FunctionElement setter,
5157 IncDecOperator operator, 5735 IncDecOperator operator,
5158 arg) { 5736 arg) {
5159 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_POSTFIX, 5737 visits.add(new Visit(VisitKind.VISIT_SUPER_FIELD_SETTER_POSTFIX,
5160 getter: field, setter: setter, operator: operator)); 5738 getter: field, setter: setter, operator: operator));
5161 } 5739 }
5162 5740
(...skipping 19 matching lines...) Expand all
5182 getter: getter, setter: setter, operator: operator)); 5760 getter: getter, setter: setter, operator: operator));
5183 } 5761 }
5184 5762
5185 @override 5763 @override
5186 visitSuperMethodSetterPostfix( 5764 visitSuperMethodSetterPostfix(
5187 Send node, 5765 Send node,
5188 FunctionElement method, 5766 FunctionElement method,
5189 FunctionElement setter, 5767 FunctionElement setter,
5190 IncDecOperator operator, 5768 IncDecOperator operator,
5191 arg) { 5769 arg) {
5192 // TODO: implement visitSuperMethodSetterPostfix 5770 visits.add(new Visit(VisitKind.VISIT_SUPER_METHOD_SETTER_POSTFIX,
5771 getter: method, setter: setter, operator: operator));
5193 } 5772 }
5194 5773
5195 @override 5774 @override
5196 visitThisPropertyPostfix( 5775 visitThisPropertyPostfix(
5197 Send node, 5776 Send node,
5198 IncDecOperator operator, 5777 IncDecOperator operator,
5199 Selector getterSelector, 5778 Selector getterSelector,
5200 Selector setterSelector, 5779 Selector setterSelector,
5201 arg) { 5780 arg) {
5202 visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_POSTFIX, 5781 visits.add(new Visit(VisitKind.VISIT_THIS_PROPERTY_POSTFIX,
(...skipping 22 matching lines...) Expand all
5225 getter: getter, setter: setter, operator: operator)); 5804 getter: getter, setter: setter, operator: operator));
5226 } 5805 }
5227 5806
5228 @override 5807 @override
5229 visitTopLevelMethodSetterPostfix( 5808 visitTopLevelMethodSetterPostfix(
5230 Send node, 5809 Send node,
5231 FunctionElement method, 5810 FunctionElement method,
5232 FunctionElement setter, 5811 FunctionElement setter,
5233 IncDecOperator operator, 5812 IncDecOperator operator,
5234 arg) { 5813 arg) {
5235 // TODO: implement visitTopLevelMethodSetterPostfix 5814 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
5815 getter: method, setter: setter, operator: operator));
5236 } 5816 }
5237 5817
5238 @override 5818 @override
5239 errorTypeVariableTypeLiteralPostfix( 5819 visitTypeVariableTypeLiteralPostfix(
5240 Send node, 5820 Send node,
5241 TypeVariableElement element, 5821 TypeVariableElement element,
5242 IncDecOperator operator, 5822 IncDecOperator operator,
5243 arg) { 5823 arg) {
5244 visits.add(new Visit(VisitKind.ERROR_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX, 5824 visits.add(new Visit(VisitKind.VISIT_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
5245 element: element, operator: operator)); 5825 element: element, operator: operator));
5246 } 5826 }
5247 5827
5248 @override 5828 @override
5249 errorTypedefTypeLiteralPostfix( 5829 visitTypedefTypeLiteralPostfix(
5250 Send node, 5830 Send node,
5251 ConstantExpression constant, 5831 ConstantExpression constant,
5252 IncDecOperator operator, 5832 IncDecOperator operator,
5253 arg) { 5833 arg) {
5254 visits.add(new Visit(VisitKind.ERROR_TYPEDEF_TYPE_LITERAL_POSTFIX, 5834 visits.add(new Visit(VisitKind.VISIT_TYPEDEF_TYPE_LITERAL_POSTFIX,
5255 constant: constant.getText(), operator: operator)); 5835 constant: constant.getText(), operator: operator));
5256 } 5836 }
5257 5837
5258 @override 5838 @override
5259 visitConstantGet( 5839 visitUnresolvedCompound(
5260 Send node,
5261 ConstantExpression constant,
5262 arg) {
5263 // TODO: implement visitConstantGet
5264 }
5265
5266 @override
5267 visitConstantInvoke(
5268 Send node,
5269 ConstantExpression constant,
5270 NodeList arguments,
5271 CallStructure callStructure,
5272 arg) {
5273 // TODO: implement visitConstantInvoke
5274 }
5275
5276 @override
5277 errorUnresolvedCompound(
5278 Send node, 5840 Send node,
5279 ErroneousElement element, 5841 ErroneousElement element,
5280 AssignmentOperator operator, 5842 AssignmentOperator operator,
5281 Node rhs, 5843 Node rhs,
5282 arg) { 5844 arg) {
5283 // TODO: implement errorUnresolvedCompound 5845 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_COMPOUND,
5846 operator: operator, rhs: rhs));
5847 apply(rhs, arg);
5284 } 5848 }
5285 5849
5286 @override 5850 @override
5287 visitUnresolvedGet( 5851 visitUnresolvedGet(
5288 Send node, 5852 Send node,
5289 Element element, 5853 Element element,
5290 arg) { 5854 arg) {
5291 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_GET, name: element.name)); 5855 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_GET, name: element.name));
5292 } 5856 }
5293 5857
5294 @override 5858 @override
5295 visitUnresolvedInvoke( 5859 visitUnresolvedInvoke(
5296 Send node, 5860 Send node,
5297 Element element, 5861 Element element,
5298 NodeList arguments, 5862 NodeList arguments,
5299 Selector selector, 5863 Selector selector,
5300 arg) { 5864 arg) {
5301 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_INVOKE, 5865 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_INVOKE,
5302 name: element.name, arguments: arguments)); 5866 name: element.name, arguments: arguments));
5303 } 5867 }
5304 5868
5305 @override 5869 @override
5306 errorUnresolvedPostfix( 5870 visitUnresolvedPostfix(
5307 Send node, 5871 Send node,
5308 ErroneousElement element, 5872 ErroneousElement element,
5309 IncDecOperator operator, 5873 IncDecOperator operator,
5310 arg) { 5874 arg) {
5311 visits.add(new Visit( 5875 visits.add(new Visit(
5312 VisitKind.ERROR_UNRESOLVED_POSTFIX, operator: operator)); 5876 VisitKind.VISIT_UNRESOLVED_POSTFIX, operator: operator));
5313 } 5877 }
5314 5878
5315 @override 5879 @override
5316 errorUnresolvedPrefix( 5880 visitUnresolvedPrefix(
5317 Send node, 5881 Send node,
5318 ErroneousElement element, 5882 ErroneousElement element,
5319 IncDecOperator operator, 5883 IncDecOperator operator,
5320 arg) { 5884 arg) {
5321 // TODO: implement errorUnresolvedPrefix 5885 visits.add(new Visit(
5886 VisitKind.VISIT_UNRESOLVED_PREFIX, operator: operator));
5322 } 5887 }
5323 5888
5324 @override 5889 @override
5325 errorUnresolvedSet( 5890 visitUnresolvedSuperCompoundIndexSet(
5326 Send node,
5327 ErroneousElement element,
5328 Node rhs,
5329 arg) {
5330 // TODO: implement errorUnresolvedSet
5331 }
5332
5333 @override
5334 errorUndefinedBinaryExpression(
5335 Send node,
5336 Node left,
5337 Operator operator,
5338 Node right,
5339 arg) {
5340 // TODO: implement errorUndefinedBinaryExpression
5341 }
5342
5343 @override
5344 errorUndefinedUnaryExpression(
5345 Send node,
5346 Operator operator,
5347 Node expression,
5348 arg) {
5349 // TODO: implement errorUndefinedUnaryExpression
5350 }
5351
5352 @override
5353 visitUnresolvedSuperGetterCompoundIndexSet(
5354 Send node, 5891 Send node,
5355 Element element, 5892 Element element,
5356 Node index, 5893 Node index,
5357 AssignmentOperator operator, 5894 AssignmentOperator operator,
5358 Node rhs, 5895 Node rhs,
5359 arg) { 5896 arg) {
5360 visits.add(new Visit( 5897 visits.add(new Visit(
5361 VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET, 5898 VisitKind.VISIT_UNRESOLVED_SUPER_COMPOUND_INDEX_SET,
5362 index: index, operator: operator, rhs: rhs)); 5899 index: index, operator: operator, rhs: rhs));
5363 apply(index, arg); 5900 apply(index, arg);
5364 apply(rhs, arg); 5901 apply(rhs, arg);
5365 } 5902 }
5903
5904 @override
5905 visitUnresolvedSuperGetterCompoundIndexSet(
5906 Send node,
5907 Element element,
5908 MethodElement setter,
5909 Node index,
5910 AssignmentOperator operator,
5911 Node rhs,
5912 arg) {
5913 visits.add(new Visit(
5914 VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET,
5915 setter: setter, index: index, operator: operator, rhs: rhs));
5916 apply(index, arg);
5917 apply(rhs, arg);
5918 }
5366 5919
5367 @override 5920 @override
5368 visitUnresolvedSuperSetterCompoundIndexSet( 5921 visitUnresolvedSuperSetterCompoundIndexSet(
5369 Send node, 5922 Send node,
5370 MethodElement getter, 5923 MethodElement getter,
5371 Element element, 5924 Element element,
5372 Node index, 5925 Node index,
5373 AssignmentOperator operator, 5926 AssignmentOperator operator,
5374 Node rhs, 5927 Node rhs,
5375 arg) { 5928 arg) {
(...skipping 11 matching lines...) Expand all
5387 Node index, 5940 Node index,
5388 Node rhs, 5941 Node rhs,
5389 arg) { 5942 arg) {
5390 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_SET, 5943 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_SET,
5391 index: index, rhs: rhs)); 5944 index: index, rhs: rhs));
5392 apply(index, arg); 5945 apply(index, arg);
5393 apply(rhs, arg); 5946 apply(rhs, arg);
5394 } 5947 }
5395 5948
5396 @override 5949 @override
5950 visitUnresolvedSuperIndexPostfix(
5951 Send node,
5952 Element element,
5953 Node index,
5954 IncDecOperator operator,
5955 arg) {
5956 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_POSTFIX,
5957 index: index, operator: operator));
5958 apply(index, arg);
5959 }
5960
5961 @override
5397 visitUnresolvedSuperGetterIndexPostfix( 5962 visitUnresolvedSuperGetterIndexPostfix(
5398 Send node, 5963 Send node,
5399 Element element, 5964 Element element,
5965 MethodElement setter,
5400 Node index, 5966 Node index,
5401 IncDecOperator operator, 5967 IncDecOperator operator,
5402 arg) { 5968 arg) {
5403 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX, 5969 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX,
5404 index: index, operator: operator)); 5970 setter: setter, index: index, operator: operator));
5405 apply(index, arg); 5971 apply(index, arg);
5406 } 5972 }
5407 5973
5408 @override 5974 @override
5409 visitUnresolvedSuperSetterIndexPostfix( 5975 visitUnresolvedSuperSetterIndexPostfix(
5410 Send node, 5976 Send node,
5411 MethodElement getter, 5977 MethodElement getter,
5412 Element element, 5978 Element element,
5413 Node index, 5979 Node index,
5414 IncDecOperator operator, 5980 IncDecOperator operator,
5415 arg) { 5981 arg) {
5416 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_INDEX_POSTFIX, 5982 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_INDEX_POSTFIX,
5417 getter: getter, index: index, operator: operator)); 5983 getter: getter, index: index, operator: operator));
5418 apply(index, arg); 5984 apply(index, arg);
5419 } 5985 }
5420 5986
5421 @override 5987 @override
5988 visitUnresolvedSuperIndexPrefix(
5989 Send node,
5990 Element element,
5991 Node index,
5992 IncDecOperator operator,
5993 arg) {
5994 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_INDEX_PREFIX,
5995 index: index, operator: operator));
5996 apply(index, arg);
5997 }
5998
5999 @override
5422 visitUnresolvedSuperGetterIndexPrefix( 6000 visitUnresolvedSuperGetterIndexPrefix(
5423 Send node, 6001 Send node,
5424 Element element, 6002 Element element,
6003 MethodElement setter,
5425 Node index, 6004 Node index,
5426 IncDecOperator operator, 6005 IncDecOperator operator,
5427 arg) { 6006 arg) {
5428 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX, 6007 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX,
5429 index: index, operator: operator)); 6008 setter: setter, index: index, operator: operator));
5430 apply(index, arg); 6009 apply(index, arg);
5431 } 6010 }
5432 6011
5433 @override 6012 @override
5434 visitUnresolvedSuperSetterIndexPrefix( 6013 visitUnresolvedSuperSetterIndexPrefix(
5435 Send node, 6014 Send node,
5436 MethodElement getter, 6015 MethodElement getter,
5437 Element element, 6016 Element element,
5438 Node index, 6017 Node index,
5439 IncDecOperator operator, 6018 IncDecOperator operator,
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
5636 visits.add(new Visit( 6215 visits.add(new Visit(
5637 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, 6216 VisitKind.VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
5638 element: constructor, 6217 element: constructor,
5639 type: type, 6218 type: type,
5640 arguments: arguments, 6219 arguments: arguments,
5641 selector: callStructure)); 6220 selector: callStructure));
5642 apply(arguments, arg); 6221 apply(arguments, arg);
5643 } 6222 }
5644 6223
5645 @override 6224 @override
5646 errorNonConstantConstructorInvoke( 6225 visitUnresolvedStaticGetterCompound(
5647 NewExpression node, 6226 Send node,
5648 Element element, 6227 Element element,
5649 DartType type, 6228 MethodElement setter,
5650 NodeList arguments, 6229 AssignmentOperator operator,
5651 CallStructure callStructure, 6230 Node rhs,
5652 arg) { 6231 arg) {
5653 visits.add(new Visit( 6232 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND,
5654 VisitKind.ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE, 6233 setter: setter, operator: operator, rhs: rhs));
5655 type: type, 6234 apply(rhs, arg);
5656 arguments: arguments, 6235 }
5657 selector: callStructure)); 6236
5658 apply(arguments, arg); 6237 @override
6238 visitUnresolvedTopLevelGetterCompound(
6239 Send node,
6240 Element element,
6241 MethodElement setter,
6242 AssignmentOperator operator,
6243 Node rhs,
6244 arg) {
6245 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND,
6246 setter: setter, operator: operator, rhs: rhs));
6247 apply(rhs, arg);
6248 }
6249
6250 @override
6251 visitUnresolvedStaticSetterCompound(
6252 Send node,
6253 MethodElement getter,
6254 Element element,
6255 AssignmentOperator operator,
6256 Node rhs,
6257 arg) {
6258 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND,
6259 getter: getter, operator: operator, rhs: rhs));
6260 apply(rhs, arg);
6261 }
6262
6263 @override
6264 visitUnresolvedTopLevelSetterCompound(
6265 Send node,
6266 MethodElement getter,
6267 Element element,
6268 AssignmentOperator operator,
6269 Node rhs,
6270 arg) {
6271 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND,
6272 getter: getter, operator: operator, rhs: rhs));
6273 apply(rhs, arg);
6274 }
6275
6276 @override
6277 visitStaticMethodCompound(
6278 Send node,
6279 MethodElement method,
6280 AssignmentOperator operator,
6281 Node rhs,
6282 arg) {
6283 visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_COMPOUND,
6284 element: method, operator: operator, rhs: rhs));
6285 apply(rhs, arg);
6286 }
6287
6288 @override
6289 visitTopLevelMethodCompound(
6290 Send node,
6291 MethodElement method,
6292 AssignmentOperator operator,
6293 Node rhs,
6294 arg) {
6295 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_COMPOUND,
6296 element: method, operator: operator, rhs: rhs));
6297 apply(rhs, arg);
6298 }
6299
6300 @override
6301 visitUnresolvedStaticGetterPrefix(
6302 Send node,
6303 Element element,
6304 MethodElement setter,
6305 IncDecOperator operator,
6306 arg) {
6307 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_PREFIX,
6308 setter: setter, operator: operator));
6309 }
6310
6311 @override
6312 visitUnresolvedTopLevelGetterPrefix(
6313 Send node,
6314 Element element,
6315 MethodElement setter,
6316 IncDecOperator operator,
6317 arg) {
6318 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_PREFIX,
6319 setter: setter, operator: operator));
6320 }
6321
6322 @override
6323 visitUnresolvedStaticSetterPrefix(
6324 Send node,
6325 MethodElement getter,
6326 Element element,
6327 IncDecOperator operator,
6328 arg) {
6329 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_PREFIX,
6330 getter: getter, operator: operator));
6331 }
6332
6333 @override
6334 visitUnresolvedTopLevelSetterPrefix(
6335 Send node,
6336 MethodElement getter,
6337 Element element,
6338 IncDecOperator operator,
6339 arg) {
6340 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_PREFIX,
6341 getter: getter, operator: operator));
6342 }
6343
6344 @override
6345 visitStaticMethodPrefix(
6346 Send node,
6347 MethodElement method,
6348 IncDecOperator operator,
6349 arg) {
6350 visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_PREFIX,
6351 element: method, operator: operator));
6352 }
6353
6354 @override
6355 visitTopLevelMethodPrefix(
6356 Send node,
6357 MethodElement method,
6358 IncDecOperator operator,
6359 arg) {
6360 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_PREFIX,
6361 element: method, operator: operator));
6362 }
6363
6364 @override
6365 visitUnresolvedStaticGetterPostfix(
6366 Send node,
6367 Element element,
6368 MethodElement setter,
6369 IncDecOperator operator,
6370 arg) {
6371 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_GETTER_POSTFIX,
6372 setter: setter, operator: operator));
6373 }
6374
6375 @override
6376 visitUnresolvedTopLevelGetterPostfix(
6377 Send node,
6378 Element element,
6379 MethodElement setter,
6380 IncDecOperator operator,
6381 arg) {
6382 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_GETTER_POSTFIX,
6383 setter: setter, operator: operator));
6384 }
6385
6386 @override
6387 visitUnresolvedStaticSetterPostfix(
6388 Send node,
6389 MethodElement getter,
6390 Element element,
6391 IncDecOperator operator,
6392 arg) {
6393 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_STATIC_SETTER_POSTFIX,
6394 getter: getter, operator: operator));
6395 }
6396
6397 @override
6398 visitUnresolvedTopLevelSetterPostfix(
6399 Send node,
6400 MethodElement getter,
6401 Element element,
6402 IncDecOperator operator,
6403 arg) {
6404 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_TOP_LEVEL_SETTER_POSTFIX,
6405 getter: getter, operator: operator));
6406 }
6407
6408 @override
6409 visitStaticMethodPostfix(
6410 Send node,
6411 MethodElement method,
6412 IncDecOperator operator,
6413 arg) {
6414 visits.add(new Visit(VisitKind.VISIT_STATIC_METHOD_POSTFIX,
6415 element: method, operator: operator));
6416 }
6417
6418 @override
6419 visitTopLevelMethodPostfix(
6420 Send node,
6421 MethodElement method,
6422 IncDecOperator operator,
6423 arg) {
6424 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_METHOD_POSTFIX,
6425 element: method, operator: operator));
6426 }
6427
6428 @override
6429 visitUnresolvedSuperGetterCompound(
6430 Send node, Element element,
6431 MethodElement setter,
6432 AssignmentOperator operator,
6433 Node rhs,
6434 arg) {
6435 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND,
6436 setter: setter, operator: operator, rhs: rhs));
6437 apply(rhs, arg);
6438 }
6439
6440 @override
6441 visitUnresolvedSuperGetterPostfix(
6442 Send node,
6443 Element element,
6444 MethodElement setter,
6445 IncDecOperator operator,
6446 arg) {
6447 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_POSTFIX,
6448 setter: setter, operator: operator));
6449 }
6450
6451 @override
6452 visitUnresolvedSuperGetterPrefix(
6453 Send node,
6454 Element element,
6455 MethodElement setter,
6456 IncDecOperator operator,
6457 arg) {
6458 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_GETTER_PREFIX,
6459 setter: setter, operator: operator));
6460 }
6461
6462 @override
6463 visitUnresolvedSuperSetterCompound(
6464 Send node, MethodElement getter,
6465 Element element,
6466 AssignmentOperator operator,
6467 Node rhs,
6468 arg) {
6469 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND,
6470 getter: getter, operator: operator, rhs: rhs));
6471 apply(rhs, arg);
6472 }
6473
6474 @override
6475 visitUnresolvedSuperSetterPostfix(
6476 Send node,
6477 MethodElement getter,
6478 Element element,
6479 IncDecOperator operator,
6480 arg) {
6481 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_POSTFIX,
6482 getter: getter, operator: operator));
6483 }
6484
6485 @override
6486 visitUnresolvedSuperSetterPrefix(
6487 Send node,
6488 MethodElement getter,
6489 Element element,
6490 IncDecOperator operator,
6491 arg) {
6492 visits.add(new Visit(VisitKind.VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
6493 getter: getter, operator: operator));
5659 } 6494 }
5660 } 6495 }
5661 6496
5662 class SemanticDeclarationTestVisitor extends SemanticTestVisitor { 6497 class SemanticDeclarationTestVisitor extends SemanticTestVisitor {
5663 6498
5664 SemanticDeclarationTestVisitor(TreeElements elements) : super(elements); 6499 SemanticDeclarationTestVisitor(TreeElements elements) : super(elements);
5665 6500
5666 @override 6501 @override
5667 errorUnresolvedSuperConstructorInvoke( 6502 errorUnresolvedSuperConstructorInvoke(
5668 Send node, 6503 Send node,
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
5907 VariableDefinitions node, 6742 VariableDefinitions node,
5908 Node definition, 6743 Node definition,
5909 LocalVariableElement variable, 6744 LocalVariableElement variable,
5910 Node initializer, 6745 Node initializer,
5911 arg) { 6746 arg) {
5912 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_DECL, 6747 visits.add(new Visit(VisitKind.VISIT_LOCAL_VARIABLE_DECL,
5913 element: variable, rhs: initializer)); 6748 element: variable, rhs: initializer));
5914 if (initializer != null) { 6749 if (initializer != null) {
5915 apply(initializer, arg); 6750 apply(initializer, arg);
5916 } 6751 }
5917 return null;
5918 } 6752 }
5919 6753
5920 @override 6754 @override
5921 visitLocalConstantDeclaration( 6755 visitLocalConstantDeclaration(
5922 VariableDefinitions node, 6756 VariableDefinitions node,
5923 Node definition, 6757 Node definition,
5924 LocalVariableElement variable, 6758 LocalVariableElement variable,
5925 ConstantExpression constant, 6759 ConstantExpression constant,
5926 arg) { 6760 arg) {
5927 visits.add(new Visit(VisitKind.VISIT_LOCAL_CONSTANT_DECL, 6761 visits.add(new Visit(VisitKind.VISIT_LOCAL_CONSTANT_DECL,
5928 element: variable, constant: constant.getText())); 6762 element: variable, constant: constant.getText()));
5929 return null;
5930 } 6763 }
5931 6764
5932 @override 6765 @override
5933 visitNamedInitializingFormalDeclaration( 6766 visitNamedInitializingFormalDeclaration(
5934 VariableDefinitions node, 6767 VariableDefinitions node,
5935 Node definition, 6768 Node definition,
5936 InitializingFormalElement initializingFormal, 6769 InitializingFormalElement initializingFormal,
5937 ConstantExpression defaultValue, 6770 ConstantExpression defaultValue,
5938 arg) { 6771 arg) {
5939 visits.add(new Visit(VisitKind.VISIT_NAMED_INITIALIZING_FORMAL_DECL, 6772 visits.add(new Visit(VisitKind.VISIT_NAMED_INITIALIZING_FORMAL_DECL,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
5972 VariableDefinitions node, 6805 VariableDefinitions node,
5973 Node definition, 6806 Node definition,
5974 FieldElement field, 6807 FieldElement field,
5975 Node initializer, 6808 Node initializer,
5976 arg) { 6809 arg) {
5977 visits.add(new Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL, 6810 visits.add(new Visit(VisitKind.VISIT_INSTANCE_FIELD_DECL,
5978 element: field, rhs: initializer)); 6811 element: field, rhs: initializer));
5979 if (initializer != null) { 6812 if (initializer != null) {
5980 apply(initializer, arg); 6813 apply(initializer, arg);
5981 } 6814 }
5982 return null;
5983 } 6815 }
5984 6816
5985 @override 6817 @override
5986 visitStaticConstantDeclaration( 6818 visitStaticConstantDeclaration(
5987 VariableDefinitions node, 6819 VariableDefinitions node,
5988 Node definition, 6820 Node definition,
5989 FieldElement field, 6821 FieldElement field,
5990 ConstantExpression constant, 6822 ConstantExpression constant,
5991 arg) { 6823 arg) {
5992 visits.add(new Visit(VisitKind.VISIT_STATIC_CONSTANT_DECL, 6824 visits.add(new Visit(VisitKind.VISIT_STATIC_CONSTANT_DECL,
5993 element: field, constant: constant.getText())); 6825 element: field, constant: constant.getText()));
5994 return null;
5995 } 6826 }
5996 6827
5997 @override 6828 @override
5998 visitStaticFieldDeclaration( 6829 visitStaticFieldDeclaration(
5999 VariableDefinitions node, 6830 VariableDefinitions node,
6000 Node definition, 6831 Node definition,
6001 FieldElement field, 6832 FieldElement field,
6002 Node initializer, 6833 Node initializer,
6003 arg) { 6834 arg) {
6004 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_DECL, 6835 visits.add(new Visit(VisitKind.VISIT_STATIC_FIELD_DECL,
6005 element: field, rhs: initializer)); 6836 element: field, rhs: initializer));
6006 if (initializer != null) { 6837 if (initializer != null) {
6007 apply(initializer, arg); 6838 apply(initializer, arg);
6008 } 6839 }
6009 return null;
6010 } 6840 }
6011 6841
6012 @override 6842 @override
6013 visitTopLevelConstantDeclaration( 6843 visitTopLevelConstantDeclaration(
6014 VariableDefinitions node, 6844 VariableDefinitions node,
6015 Node definition, 6845 Node definition,
6016 FieldElement field, 6846 FieldElement field,
6017 ConstantExpression constant, 6847 ConstantExpression constant,
6018 arg) { 6848 arg) {
6019 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL, 6849 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_CONSTANT_DECL,
6020 element: field, constant: constant.getText())); 6850 element: field, constant: constant.getText()));
6021 return null;
6022 } 6851 }
6023 6852
6024 @override 6853 @override
6025 visitTopLevelFieldDeclaration( 6854 visitTopLevelFieldDeclaration(
6026 VariableDefinitions node, 6855 VariableDefinitions node,
6027 Node definition, 6856 Node definition,
6028 FieldElement field, 6857 FieldElement field,
6029 Node initializer, 6858 Node initializer,
6030 arg) { 6859 arg) {
6031 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL, 6860 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_FIELD_DECL,
6032 element: field, rhs: initializer)); 6861 element: field, rhs: initializer));
6033 if (initializer != null) { 6862 if (initializer != null) {
6034 apply(initializer, arg); 6863 apply(initializer, arg);
6035 } 6864 }
6036 return null;
6037 } 6865 }
6038 6866
6039 @override 6867 @override
6040 visitAbstractGetterDeclaration( 6868 visitAbstractGetterDeclaration(
6041 FunctionExpression node, 6869 FunctionExpression node,
6042 MethodElement getter, 6870 MethodElement getter,
6043 arg) { 6871 arg) {
6044 visits.add(new Visit(VisitKind.VISIT_ABSTRACT_GETTER_DECL, 6872 visits.add(new Visit(VisitKind.VISIT_ABSTRACT_GETTER_DECL,
6045 element: getter)); 6873 element: getter));
6046 return null;
6047 } 6874 }
6048 6875
6049 @override 6876 @override
6050 visitAbstractSetterDeclaration( 6877 visitAbstractSetterDeclaration(
6051 FunctionExpression node, 6878 FunctionExpression node,
6052 MethodElement setter, 6879 MethodElement setter,
6053 NodeList parameters, 6880 NodeList parameters,
6054 arg) { 6881 arg) {
6055 visits.add(new Visit(VisitKind.VISIT_ABSTRACT_SETTER_DECL, 6882 visits.add(new Visit(VisitKind.VISIT_ABSTRACT_SETTER_DECL,
6056 element: setter, parameters: parameters)); 6883 element: setter, parameters: parameters));
6057 applyParameters(parameters, arg); 6884 applyParameters(parameters, arg);
6058 return null;
6059 } 6885 }
6060 6886
6061 @override 6887 @override
6062 visitInstanceGetterDeclaration( 6888 visitInstanceGetterDeclaration(
6063 FunctionExpression node, 6889 FunctionExpression node,
6064 MethodElement getter, 6890 MethodElement getter,
6065 Node body, 6891 Node body,
6066 arg) { 6892 arg) {
6067 visits.add(new Visit(VisitKind.VISIT_INSTANCE_GETTER_DECL, 6893 visits.add(new Visit(VisitKind.VISIT_INSTANCE_GETTER_DECL,
6068 element: getter, body: body)); 6894 element: getter, body: body));
6069 apply(body, arg); 6895 apply(body, arg);
6070 return null;
6071 } 6896 }
6072 6897
6073 @override 6898 @override
6074 visitInstanceSetterDeclaration( 6899 visitInstanceSetterDeclaration(
6075 FunctionExpression node, 6900 FunctionExpression node,
6076 MethodElement setter, 6901 MethodElement setter,
6077 NodeList parameters, 6902 NodeList parameters,
6078 Node body, 6903 Node body,
6079 arg) { 6904 arg) {
6080 visits.add(new Visit(VisitKind.VISIT_INSTANCE_SETTER_DECL, 6905 visits.add(new Visit(VisitKind.VISIT_INSTANCE_SETTER_DECL,
6081 element: setter, parameters: parameters, body: body)); 6906 element: setter, parameters: parameters, body: body));
6082 applyParameters(parameters, arg); 6907 applyParameters(parameters, arg);
6083 apply(body, arg); 6908 apply(body, arg);
6084 return null;
6085 } 6909 }
6086 6910
6087 @override 6911 @override
6088 visitTopLevelGetterDeclaration( 6912 visitTopLevelGetterDeclaration(
6089 FunctionExpression node, 6913 FunctionExpression node,
6090 MethodElement getter, 6914 MethodElement getter,
6091 Node body, 6915 Node body,
6092 arg) { 6916 arg) {
6093 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_DECL, 6917 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_GETTER_DECL,
6094 element: getter, body: body)); 6918 element: getter, body: body));
6095 apply(body, arg); 6919 apply(body, arg);
6096 return null;
6097 } 6920 }
6098 6921
6099 @override 6922 @override
6100 visitTopLevelSetterDeclaration( 6923 visitTopLevelSetterDeclaration(
6101 FunctionExpression node, 6924 FunctionExpression node,
6102 MethodElement setter, 6925 MethodElement setter,
6103 NodeList parameters, 6926 NodeList parameters,
6104 Node body, 6927 Node body,
6105 arg) { 6928 arg) {
6106 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_DECL, 6929 visits.add(new Visit(VisitKind.VISIT_TOP_LEVEL_SETTER_DECL,
6107 element: setter, parameters: parameters, body: body)); 6930 element: setter, parameters: parameters, body: body));
6108 applyParameters(parameters, arg); 6931 applyParameters(parameters, arg);
6109 apply(body, arg); 6932 apply(body, arg);
6110 return null;
6111 } 6933 }
6112 6934
6113 @override 6935 @override
6114 visitStaticGetterDeclaration( 6936 visitStaticGetterDeclaration(
6115 FunctionExpression node, 6937 FunctionExpression node,
6116 MethodElement getter, 6938 MethodElement getter,
6117 Node body, 6939 Node body,
6118 arg) { 6940 arg) {
6119 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_DECL, 6941 visits.add(new Visit(VisitKind.VISIT_STATIC_GETTER_DECL,
6120 element: getter, body: body)); 6942 element: getter, body: body));
6121 apply(body, arg); 6943 apply(body, arg);
6122 return null;
6123 } 6944 }
6124 6945
6125 @override 6946 @override
6126 visitStaticSetterDeclaration( 6947 visitStaticSetterDeclaration(
6127 FunctionExpression node, 6948 FunctionExpression node,
6128 MethodElement setter, 6949 MethodElement setter,
6129 NodeList parameters, 6950 NodeList parameters,
6130 Node body, 6951 Node body,
6131 arg) { 6952 arg) {
6132 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_DECL, 6953 visits.add(new Visit(VisitKind.VISIT_STATIC_SETTER_DECL,
6133 element: setter, parameters: parameters, body: body)); 6954 element: setter, parameters: parameters, body: body));
6134 applyParameters(parameters, arg); 6955 applyParameters(parameters, arg);
6135 apply(body, arg); 6956 apply(body, arg);
6136 return null;
6137 } 6957 }
6138 6958
6139 @override 6959 @override
6140 visitUnresolvedClassConstructorInvoke( 6960 visitUnresolvedClassConstructorInvoke(
6141 NewExpression node, 6961 NewExpression node,
6142 Element constructor, 6962 Element constructor,
6143 MalformedType type, 6963 MalformedType type,
6144 NodeList arguments, 6964 NodeList arguments,
6145 Selector selector, 6965 Selector selector,
6146 arg) { 6966 arg) {
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
6282 } 7102 }
6283 } 7103 }
6284 7104
6285 enum VisitKind { 7105 enum VisitKind {
6286 VISIT_PARAMETER_GET, 7106 VISIT_PARAMETER_GET,
6287 VISIT_PARAMETER_SET, 7107 VISIT_PARAMETER_SET,
6288 VISIT_PARAMETER_INVOKE, 7108 VISIT_PARAMETER_INVOKE,
6289 VISIT_PARAMETER_COMPOUND, 7109 VISIT_PARAMETER_COMPOUND,
6290 VISIT_PARAMETER_PREFIX, 7110 VISIT_PARAMETER_PREFIX,
6291 VISIT_PARAMETER_POSTFIX, 7111 VISIT_PARAMETER_POSTFIX,
7112 VISIT_FINAL_PARAMETER_COMPOUND,
7113 VISIT_FINAL_PARAMETER_PREFIX,
7114 VISIT_FINAL_PARAMETER_POSTFIX,
6292 7115
6293 VISIT_LOCAL_VARIABLE_GET, 7116 VISIT_LOCAL_VARIABLE_GET,
6294 VISIT_LOCAL_VARIABLE_SET, 7117 VISIT_LOCAL_VARIABLE_SET,
6295 VISIT_LOCAL_VARIABLE_INVOKE, 7118 VISIT_LOCAL_VARIABLE_INVOKE,
6296 VISIT_LOCAL_VARIABLE_COMPOUND, 7119 VISIT_LOCAL_VARIABLE_COMPOUND,
6297 VISIT_LOCAL_VARIABLE_PREFIX, 7120 VISIT_LOCAL_VARIABLE_PREFIX,
6298 VISIT_LOCAL_VARIABLE_POSTFIX, 7121 VISIT_LOCAL_VARIABLE_POSTFIX,
6299 VISIT_LOCAL_VARIABLE_DECL, 7122 VISIT_LOCAL_VARIABLE_DECL,
6300 VISIT_LOCAL_CONSTANT_DECL, 7123 VISIT_LOCAL_CONSTANT_DECL,
7124 VISIT_FINAL_LOCAL_VARIABLE_COMPOUND,
7125 VISIT_FINAL_LOCAL_VARIABLE_PREFIX,
7126 VISIT_FINAL_LOCAL_VARIABLE_POSTFIX,
6301 7127
6302 VISIT_LOCAL_FUNCTION_GET, 7128 VISIT_LOCAL_FUNCTION_GET,
6303 VISIT_LOCAL_FUNCTION_INVOKE, 7129 VISIT_LOCAL_FUNCTION_INVOKE,
6304 VISIT_LOCAL_FUNCTION_DECL, 7130 VISIT_LOCAL_FUNCTION_DECL,
6305 VISIT_CLOSURE_DECL, 7131 VISIT_CLOSURE_DECL,
7132 VISIT_LOCAL_FUNCTION_COMPOUND,
7133 VISIT_LOCAL_FUNCTION_PREFIX,
7134 VISIT_LOCAL_FUNCTION_POSTFIX,
6306 7135
6307 VISIT_STATIC_FIELD_GET, 7136 VISIT_STATIC_FIELD_GET,
6308 VISIT_STATIC_FIELD_SET, 7137 VISIT_STATIC_FIELD_SET,
6309 VISIT_STATIC_FIELD_INVOKE, 7138 VISIT_STATIC_FIELD_INVOKE,
6310 VISIT_STATIC_FIELD_COMPOUND, 7139 VISIT_STATIC_FIELD_COMPOUND,
6311 VISIT_STATIC_FIELD_PREFIX, 7140 VISIT_STATIC_FIELD_PREFIX,
6312 VISIT_STATIC_FIELD_POSTFIX, 7141 VISIT_STATIC_FIELD_POSTFIX,
6313 VISIT_STATIC_FIELD_DECL, 7142 VISIT_STATIC_FIELD_DECL,
6314 VISIT_STATIC_CONSTANT_DECL, 7143 VISIT_STATIC_CONSTANT_DECL,
6315 7144
6316 VISIT_STATIC_GETTER_GET, 7145 VISIT_STATIC_GETTER_GET,
6317 VISIT_STATIC_SETTER_SET, 7146 VISIT_STATIC_SETTER_SET,
6318 VISIT_STATIC_GETTER_INVOKE, 7147 VISIT_STATIC_GETTER_INVOKE,
6319 VISIT_STATIC_GETTER_SETTER_COMPOUND, 7148 VISIT_STATIC_GETTER_SETTER_COMPOUND,
6320 VISIT_STATIC_METHOD_SETTER_COMPOUND, 7149 VISIT_STATIC_METHOD_SETTER_COMPOUND,
6321 VISIT_STATIC_GETTER_SETTER_PREFIX, 7150 VISIT_STATIC_GETTER_SETTER_PREFIX,
6322 VISIT_STATIC_GETTER_SETTER_POSTFIX, 7151 VISIT_STATIC_GETTER_SETTER_POSTFIX,
6323 VISIT_STATIC_GETTER_DECL, 7152 VISIT_STATIC_GETTER_DECL,
6324 VISIT_STATIC_SETTER_DECL, 7153 VISIT_STATIC_SETTER_DECL,
7154 VISIT_STATIC_FINAL_FIELD_COMPOUND,
7155 VISIT_STATIC_FINAL_FIELD_POSTFIX,
7156 VISIT_STATIC_FINAL_FIELD_PREFIX,
6325 7157
6326 VISIT_STATIC_FUNCTION_GET, 7158 VISIT_STATIC_FUNCTION_GET,
6327 VISIT_STATIC_FUNCTION_INVOKE, 7159 VISIT_STATIC_FUNCTION_INVOKE,
6328 VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE, 7160 VISIT_STATIC_FUNCTION_INCOMPATIBLE_INVOKE,
6329 VISIT_STATIC_FUNCTION_DECL, 7161 VISIT_STATIC_FUNCTION_DECL,
7162 VISIT_STATIC_METHOD_SETTER_PREFIX,
7163 VISIT_STATIC_METHOD_SETTER_POSTFIX,
7164
7165 VISIT_UNRESOLVED_STATIC_GETTER_COMPOUND,
7166 VISIT_UNRESOLVED_STATIC_SETTER_COMPOUND,
7167 VISIT_STATIC_METHOD_COMPOUND,
7168 VISIT_UNRESOLVED_STATIC_GETTER_PREFIX,
7169 VISIT_UNRESOLVED_STATIC_SETTER_PREFIX,
7170 VISIT_STATIC_METHOD_PREFIX,
7171 VISIT_UNRESOLVED_STATIC_GETTER_POSTFIX,
7172 VISIT_UNRESOLVED_STATIC_SETTER_POSTFIX,
7173 VISIT_STATIC_METHOD_POSTFIX,
6330 7174
6331 VISIT_TOP_LEVEL_FIELD_GET, 7175 VISIT_TOP_LEVEL_FIELD_GET,
6332 VISIT_TOP_LEVEL_FIELD_SET, 7176 VISIT_TOP_LEVEL_FIELD_SET,
6333 VISIT_TOP_LEVEL_FIELD_INVOKE, 7177 VISIT_TOP_LEVEL_FIELD_INVOKE,
6334 VISIT_TOP_LEVEL_FIELD_COMPOUND, 7178 VISIT_TOP_LEVEL_FIELD_COMPOUND,
6335 VISIT_TOP_LEVEL_FIELD_PREFIX, 7179 VISIT_TOP_LEVEL_FIELD_PREFIX,
6336 VISIT_TOP_LEVEL_FIELD_POSTFIX, 7180 VISIT_TOP_LEVEL_FIELD_POSTFIX,
6337 VISIT_TOP_LEVEL_FIELD_DECL, 7181 VISIT_TOP_LEVEL_FIELD_DECL,
6338 VISIT_TOP_LEVEL_CONSTANT_DECL, 7182 VISIT_TOP_LEVEL_CONSTANT_DECL,
7183 VISIT_TOP_LEVEL_FINAL_FIELD_COMPOUND,
7184 VISIT_TOP_LEVEL_FINAL_FIELD_POSTFIX,
7185 VISIT_TOP_LEVEL_FINAL_FIELD_PREFIX,
6339 7186
6340 VISIT_TOP_LEVEL_GETTER_GET, 7187 VISIT_TOP_LEVEL_GETTER_GET,
6341 VISIT_TOP_LEVEL_SETTER_SET, 7188 VISIT_TOP_LEVEL_SETTER_SET,
6342 VISIT_TOP_LEVEL_GETTER_INVOKE, 7189 VISIT_TOP_LEVEL_GETTER_INVOKE,
6343 VISIT_TOP_LEVEL_GETTER_SETTER_COMPOUND, 7190 VISIT_TOP_LEVEL_GETTER_SETTER_COMPOUND,
6344 VISIT_TOP_LEVEL_GETTER_SETTER_PREFIX, 7191 VISIT_TOP_LEVEL_GETTER_SETTER_PREFIX,
6345 VISIT_TOP_LEVEL_GETTER_SETTER_POSTFIX, 7192 VISIT_TOP_LEVEL_GETTER_SETTER_POSTFIX,
6346 VISIT_TOP_LEVEL_GETTER_DECL, 7193 VISIT_TOP_LEVEL_GETTER_DECL,
6347 VISIT_TOP_LEVEL_SETTER_DECL, 7194 VISIT_TOP_LEVEL_SETTER_DECL,
6348 7195
6349 VISIT_TOP_LEVEL_FUNCTION_GET, 7196 VISIT_TOP_LEVEL_FUNCTION_GET,
6350 VISIT_TOP_LEVEL_FUNCTION_INVOKE, 7197 VISIT_TOP_LEVEL_FUNCTION_INVOKE,
6351 VISIT_TOP_LEVEL_FUNCTION_INCOMPATIBLE_INVOKE, 7198 VISIT_TOP_LEVEL_FUNCTION_INCOMPATIBLE_INVOKE,
6352 VISIT_TOP_LEVEL_FUNCTION_DECL, 7199 VISIT_TOP_LEVEL_FUNCTION_DECL,
7200 VISIT_TOP_LEVEL_METHOD_SETTER_COMPOUND,
7201 VISIT_TOP_LEVEL_METHOD_SETTER_PREFIX,
7202 VISIT_TOP_LEVEL_METHOD_SETTER_POSTFIX,
7203
7204 VISIT_UNRESOLVED_TOP_LEVEL_GETTER_COMPOUND,
7205 VISIT_UNRESOLVED_TOP_LEVEL_SETTER_COMPOUND,
7206 VISIT_TOP_LEVEL_METHOD_COMPOUND,
7207 VISIT_UNRESOLVED_TOP_LEVEL_GETTER_PREFIX,
7208 VISIT_UNRESOLVED_TOP_LEVEL_SETTER_PREFIX,
7209 VISIT_TOP_LEVEL_METHOD_PREFIX,
7210 VISIT_UNRESOLVED_TOP_LEVEL_GETTER_POSTFIX,
7211 VISIT_UNRESOLVED_TOP_LEVEL_SETTER_POSTFIX,
7212 VISIT_TOP_LEVEL_METHOD_POSTFIX,
6353 7213
6354 VISIT_DYNAMIC_PROPERTY_GET, 7214 VISIT_DYNAMIC_PROPERTY_GET,
6355 VISIT_DYNAMIC_PROPERTY_SET, 7215 VISIT_DYNAMIC_PROPERTY_SET,
6356 VISIT_DYNAMIC_PROPERTY_INVOKE, 7216 VISIT_DYNAMIC_PROPERTY_INVOKE,
6357 VISIT_DYNAMIC_PROPERTY_COMPOUND, 7217 VISIT_DYNAMIC_PROPERTY_COMPOUND,
6358 VISIT_DYNAMIC_PROPERTY_PREFIX, 7218 VISIT_DYNAMIC_PROPERTY_PREFIX,
6359 VISIT_DYNAMIC_PROPERTY_POSTFIX, 7219 VISIT_DYNAMIC_PROPERTY_POSTFIX,
6360 7220
6361 VISIT_THIS_GET, 7221 VISIT_THIS_GET,
6362 VISIT_THIS_INVOKE, 7222 VISIT_THIS_INVOKE,
6363 7223
6364 VISIT_THIS_PROPERTY_GET, 7224 VISIT_THIS_PROPERTY_GET,
6365 VISIT_THIS_PROPERTY_SET, 7225 VISIT_THIS_PROPERTY_SET,
6366 VISIT_THIS_PROPERTY_INVOKE, 7226 VISIT_THIS_PROPERTY_INVOKE,
6367 VISIT_THIS_PROPERTY_COMPOUND, 7227 VISIT_THIS_PROPERTY_COMPOUND,
6368 VISIT_THIS_PROPERTY_PREFIX, 7228 VISIT_THIS_PROPERTY_PREFIX,
6369 VISIT_THIS_PROPERTY_POSTFIX, 7229 VISIT_THIS_PROPERTY_POSTFIX,
6370 7230
6371 VISIT_SUPER_FIELD_GET, 7231 VISIT_SUPER_FIELD_GET,
6372 VISIT_SUPER_FIELD_SET, 7232 VISIT_SUPER_FIELD_SET,
6373 VISIT_SUPER_FIELD_INVOKE, 7233 VISIT_SUPER_FIELD_INVOKE,
6374 VISIT_SUPER_FIELD_COMPOUND, 7234 VISIT_SUPER_FIELD_COMPOUND,
6375 VISIT_SUPER_FIELD_PREFIX, 7235 VISIT_SUPER_FIELD_PREFIX,
6376 VISIT_SUPER_FIELD_POSTFIX, 7236 VISIT_SUPER_FIELD_POSTFIX,
7237 VISIT_SUPER_FINAL_FIELD_COMPOUND,
7238 VISIT_SUPER_FINAL_FIELD_PREFIX,
7239 VISIT_SUPER_FINAL_FIELD_POSTFIX,
7240 VISIT_SUPER_FIELD_FIELD_COMPOUND,
7241 VISIT_SUPER_FIELD_FIELD_PREFIX,
7242 VISIT_SUPER_FIELD_FIELD_POSTFIX,
6377 7243
6378 VISIT_SUPER_GETTER_GET, 7244 VISIT_SUPER_GETTER_GET,
6379 VISIT_SUPER_SETTER_SET, 7245 VISIT_SUPER_SETTER_SET,
6380 VISIT_SUPER_GETTER_INVOKE, 7246 VISIT_SUPER_GETTER_INVOKE,
6381 VISIT_SUPER_GETTER_SETTER_COMPOUND, 7247 VISIT_SUPER_GETTER_SETTER_COMPOUND,
6382 VISIT_SUPER_GETTER_FIELD_COMPOUND, 7248 VISIT_SUPER_GETTER_FIELD_COMPOUND,
6383 VISIT_SUPER_FIELD_SETTER_COMPOUND, 7249 VISIT_SUPER_FIELD_SETTER_COMPOUND,
6384 VISIT_SUPER_GETTER_SETTER_PREFIX, 7250 VISIT_SUPER_GETTER_SETTER_PREFIX,
6385 VISIT_SUPER_GETTER_FIELD_PREFIX, 7251 VISIT_SUPER_GETTER_FIELD_PREFIX,
6386 VISIT_SUPER_FIELD_SETTER_PREFIX, 7252 VISIT_SUPER_FIELD_SETTER_PREFIX,
6387 VISIT_SUPER_GETTER_SETTER_POSTFIX, 7253 VISIT_SUPER_GETTER_SETTER_POSTFIX,
6388 VISIT_SUPER_GETTER_FIELD_POSTFIX, 7254 VISIT_SUPER_GETTER_FIELD_POSTFIX,
6389 VISIT_SUPER_FIELD_SETTER_POSTFIX, 7255 VISIT_SUPER_FIELD_SETTER_POSTFIX,
6390 7256
6391 VISIT_SUPER_METHOD_GET, 7257 VISIT_SUPER_METHOD_GET,
6392 VISIT_SUPER_METHOD_INVOKE, 7258 VISIT_SUPER_METHOD_INVOKE,
6393 VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE, 7259 VISIT_SUPER_METHOD_INCOMPATIBLE_INVOKE,
7260 VISIT_SUPER_METHOD_SETTER_COMPOUND,
7261 VISIT_SUPER_METHOD_SETTER_PREFIX,
7262 VISIT_SUPER_METHOD_SETTER_POSTFIX,
7263 VISIT_SUPER_METHOD_COMPOUND,
7264 VISIT_SUPER_METHOD_PREFIX,
7265 VISIT_SUPER_METHOD_POSTFIX,
6394 7266
6395 VISIT_UNRESOLVED_GET, 7267 VISIT_UNRESOLVED_GET,
6396 VISIT_UNRESOLVED_INVOKE, 7268 VISIT_UNRESOLVED_INVOKE,
6397 VISIT_UNRESOLVED_SUPER_GET, 7269 VISIT_UNRESOLVED_SUPER_GET,
6398 VISIT_UNRESOLVED_SUPER_INVOKE, 7270 VISIT_UNRESOLVED_SUPER_INVOKE,
6399 7271
6400 VISIT_BINARY, 7272 VISIT_BINARY,
6401 VISIT_INDEX, 7273 VISIT_INDEX,
6402 VISIT_EQUALS, 7274 VISIT_EQUALS,
6403 VISIT_NOT_EQUALS, 7275 VISIT_NOT_EQUALS,
6404 VISIT_INDEX_PREFIX, 7276 VISIT_INDEX_PREFIX,
6405 VISIT_INDEX_POSTFIX, 7277 VISIT_INDEX_POSTFIX,
6406 7278
6407 VISIT_SUPER_BINARY, 7279 VISIT_SUPER_BINARY,
6408 VISIT_UNRESOLVED_SUPER_BINARY, 7280 VISIT_UNRESOLVED_SUPER_BINARY,
6409 VISIT_SUPER_INDEX, 7281 VISIT_SUPER_INDEX,
6410 VISIT_UNRESOLVED_SUPER_INDEX, 7282 VISIT_UNRESOLVED_SUPER_INDEX,
6411 VISIT_SUPER_EQUALS, 7283 VISIT_SUPER_EQUALS,
6412 VISIT_SUPER_NOT_EQUALS, 7284 VISIT_SUPER_NOT_EQUALS,
6413 VISIT_SUPER_INDEX_PREFIX, 7285 VISIT_SUPER_INDEX_PREFIX,
7286 VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND,
7287 VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND,
7288 VISIT_UNRESOLVED_SUPER_GETTER_PREFIX,
7289 VISIT_UNRESOLVED_SUPER_SETTER_PREFIX,
7290 VISIT_UNRESOLVED_SUPER_INDEX_PREFIX,
6414 VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX, 7291 VISIT_UNRESOLVED_SUPER_GETTER_INDEX_PREFIX,
6415 VISIT_UNRESOLVED_SUPER_SETTER_INDEX_PREFIX, 7292 VISIT_UNRESOLVED_SUPER_SETTER_INDEX_PREFIX,
6416 VISIT_SUPER_INDEX_POSTFIX, 7293 VISIT_SUPER_INDEX_POSTFIX,
7294 VISIT_UNRESOLVED_SUPER_GETTER_POSTFIX,
7295 VISIT_UNRESOLVED_SUPER_SETTER_POSTFIX,
7296 VISIT_UNRESOLVED_SUPER_INDEX_POSTFIX,
6417 VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX, 7297 VISIT_UNRESOLVED_SUPER_GETTER_INDEX_POSTFIX,
6418 VISIT_UNRESOLVED_SUPER_SETTER_INDEX_POSTFIX, 7298 VISIT_UNRESOLVED_SUPER_SETTER_INDEX_POSTFIX,
6419 7299
7300 VISIT_UNRESOLVED_SUPER_COMPOUND,
7301 VISIT_UNRESOLVED_SUPER_PREFIX,
7302 VISIT_UNRESOLVED_SUPER_POSTFIX,
7303
6420 VISIT_UNARY, 7304 VISIT_UNARY,
6421 VISIT_SUPER_UNARY, 7305 VISIT_SUPER_UNARY,
6422 VISIT_UNRESOLVED_SUPER_UNARY, 7306 VISIT_UNRESOLVED_SUPER_UNARY,
6423 VISIT_NOT, 7307 VISIT_NOT,
6424 7308
6425 VISIT_EXPRESSION_INVOKE, 7309 VISIT_EXPRESSION_INVOKE,
6426 7310
6427 VISIT_CLASS_TYPE_LITERAL_GET, 7311 VISIT_CLASS_TYPE_LITERAL_GET,
6428 VISIT_CLASS_TYPE_LITERAL_SET, 7312 VISIT_CLASS_TYPE_LITERAL_SET,
6429 VISIT_CLASS_TYPE_LITERAL_INVOKE, 7313 VISIT_CLASS_TYPE_LITERAL_INVOKE,
6430 VISIT_CLASS_TYPE_LITERAL_BINARY, 7314 VISIT_CLASS_TYPE_LITERAL_COMPOUND,
6431 ERROR_CLASS_TYPE_LITERAL_COMPOUND, 7315 VISIT_CLASS_TYPE_LITERAL_PREFIX,
6432 ERROR_CLASS_TYPE_LITERAL_PREFIX, 7316 VISIT_CLASS_TYPE_LITERAL_POSTFIX,
6433 ERROR_CLASS_TYPE_LITERAL_POSTFIX,
6434 7317
6435 VISIT_TYPEDEF_TYPE_LITERAL_GET, 7318 VISIT_TYPEDEF_TYPE_LITERAL_GET,
6436 VISIT_TYPEDEF_TYPE_LITERAL_SET, 7319 VISIT_TYPEDEF_TYPE_LITERAL_SET,
6437 VISIT_TYPEDEF_TYPE_LITERAL_INVOKE, 7320 VISIT_TYPEDEF_TYPE_LITERAL_INVOKE,
6438 VISIT_TYPEDEF_TYPE_LITERAL_BINARY, 7321 VISIT_TYPEDEF_TYPE_LITERAL_COMPOUND,
6439 ERROR_TYPEDEF_TYPE_LITERAL_COMPOUND, 7322 VISIT_TYPEDEF_TYPE_LITERAL_PREFIX,
6440 ERROR_TYPEDEF_TYPE_LITERAL_PREFIX, 7323 VISIT_TYPEDEF_TYPE_LITERAL_POSTFIX,
6441 ERROR_TYPEDEF_TYPE_LITERAL_POSTFIX,
6442 7324
6443 VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET, 7325 VISIT_TYPE_VARIABLE_TYPE_LITERAL_GET,
6444 VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET, 7326 VISIT_TYPE_VARIABLE_TYPE_LITERAL_SET,
6445 VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE, 7327 VISIT_TYPE_VARIABLE_TYPE_LITERAL_INVOKE,
6446 VISIT_TYPE_VARIABLE_TYPE_LITERAL_BINARY, 7328 VISIT_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND,
6447 ERROR_TYPE_VARIABLE_TYPE_LITERAL_COMPOUND, 7329 VISIT_TYPE_VARIABLE_TYPE_LITERAL_PREFIX,
6448 ERROR_TYPE_VARIABLE_TYPE_LITERAL_PREFIX, 7330 VISIT_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
6449 ERROR_TYPE_VARIABLE_TYPE_LITERAL_POSTFIX,
6450 7331
6451 VISIT_DYNAMIC_TYPE_LITERAL_GET, 7332 VISIT_DYNAMIC_TYPE_LITERAL_GET,
6452 VISIT_DYNAMIC_TYPE_LITERAL_SET, 7333 VISIT_DYNAMIC_TYPE_LITERAL_SET,
6453 VISIT_DYNAMIC_TYPE_LITERAL_INVOKE, 7334 VISIT_DYNAMIC_TYPE_LITERAL_INVOKE,
6454 VISIT_DYNAMIC_TYPE_LITERAL_BINARY, 7335 VISIT_DYNAMIC_TYPE_LITERAL_COMPOUND,
6455 ERROR_DYNAMIC_TYPE_LITERAL_COMPOUND, 7336 VISIT_DYNAMIC_TYPE_LITERAL_PREFIX,
6456 ERROR_DYNAMIC_TYPE_LITERAL_PREFIX, 7337 VISIT_DYNAMIC_TYPE_LITERAL_POSTFIX,
6457 ERROR_DYNAMIC_TYPE_LITERAL_POSTFIX,
6458 7338
6459 VISIT_INDEX_SET, 7339 VISIT_INDEX_SET,
6460 VISIT_COMPOUND_INDEX_SET, 7340 VISIT_COMPOUND_INDEX_SET,
6461 VISIT_SUPER_INDEX_SET, 7341 VISIT_SUPER_INDEX_SET,
6462 VISIT_UNRESOLVED_SUPER_INDEX_SET, 7342 VISIT_UNRESOLVED_SUPER_INDEX_SET,
6463 VISIT_SUPER_COMPOUND_INDEX_SET, 7343 VISIT_SUPER_COMPOUND_INDEX_SET,
7344 VISIT_UNRESOLVED_SUPER_COMPOUND_INDEX_SET,
6464 VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET, 7345 VISIT_UNRESOLVED_SUPER_GETTER_COMPOUND_INDEX_SET,
6465 VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND_INDEX_SET, 7346 VISIT_UNRESOLVED_SUPER_SETTER_COMPOUND_INDEX_SET,
6466 7347
6467 VISIT_ASSERT, 7348 VISIT_ASSERT,
6468 VISIT_LOGICAL_AND, 7349 VISIT_LOGICAL_AND,
6469 VISIT_LOGICAL_OR, 7350 VISIT_LOGICAL_OR,
6470 VISIT_IS, 7351 VISIT_IS,
6471 VISIT_IS_NOT, 7352 VISIT_IS_NOT,
6472 VISIT_AS, 7353 VISIT_AS,
6473 7354
6474 VISIT_CONST_CONSTRUCTOR_INVOKE, 7355 VISIT_CONST_CONSTRUCTOR_INVOKE,
6475 VISIT_GENERATIVE_CONSTRUCTOR_INVOKE, 7356 VISIT_GENERATIVE_CONSTRUCTOR_INVOKE,
6476 VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_INVOKE, 7357 VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_INVOKE,
6477 VISIT_FACTORY_CONSTRUCTOR_INVOKE, 7358 VISIT_FACTORY_CONSTRUCTOR_INVOKE,
6478 VISIT_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, 7359 VISIT_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
6479 7360
6480 VISIT_SUPER_CONSTRUCTOR_INVOKE, 7361 VISIT_SUPER_CONSTRUCTOR_INVOKE,
6481 VISIT_THIS_CONSTRUCTOR_INVOKE, 7362 VISIT_THIS_CONSTRUCTOR_INVOKE,
6482 VISIT_FIELD_INITIALIZER, 7363 VISIT_FIELD_INITIALIZER,
6483 7364
6484 VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE, 7365 VISIT_UNRESOLVED_CLASS_CONSTRUCTOR_INVOKE,
6485 VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE, 7366 VISIT_UNRESOLVED_CONSTRUCTOR_INVOKE,
6486 VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE, 7367 VISIT_ABSTRACT_CLASS_CONSTRUCTOR_INVOKE,
6487 VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE, 7368 VISIT_UNRESOLVED_REDIRECTING_FACTORY_CONSTRUCTOR_INVOKE,
6488 ERROR_NON_CONSTANT_CONSTRUCTOR_INVOKE,
6489 7369
6490 VISIT_INSTANCE_GETTER_DECL, 7370 VISIT_INSTANCE_GETTER_DECL,
6491 VISIT_INSTANCE_SETTER_DECL, 7371 VISIT_INSTANCE_SETTER_DECL,
6492 VISIT_INSTANCE_METHOD_DECL, 7372 VISIT_INSTANCE_METHOD_DECL,
6493 VISIT_ABSTRACT_GETTER_DECL, 7373 VISIT_ABSTRACT_GETTER_DECL,
6494 VISIT_ABSTRACT_SETTER_DECL, 7374 VISIT_ABSTRACT_SETTER_DECL,
6495 VISIT_ABSTRACT_METHOD_DECL, 7375 VISIT_ABSTRACT_METHOD_DECL,
6496 VISIT_INSTANCE_FIELD_DECL, 7376 VISIT_INSTANCE_FIELD_DECL,
6497 7377
6498 VISIT_GENERATIVE_CONSTRUCTOR_DECL, 7378 VISIT_GENERATIVE_CONSTRUCTOR_DECL,
6499 VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_DECL, 7379 VISIT_REDIRECTING_GENERATIVE_CONSTRUCTOR_DECL,
6500 VISIT_FACTORY_CONSTRUCTOR_DECL, 7380 VISIT_FACTORY_CONSTRUCTOR_DECL,
6501 VISIT_REDIRECTING_FACTORY_CONSTRUCTOR_DECL, 7381 VISIT_REDIRECTING_FACTORY_CONSTRUCTOR_DECL,
6502 7382
6503 VISIT_REQUIRED_PARAMETER_DECL, 7383 VISIT_REQUIRED_PARAMETER_DECL,
6504 VISIT_OPTIONAL_PARAMETER_DECL, 7384 VISIT_OPTIONAL_PARAMETER_DECL,
6505 VISIT_NAMED_PARAMETER_DECL, 7385 VISIT_NAMED_PARAMETER_DECL,
6506 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL, 7386 VISIT_REQUIRED_INITIALIZING_FORMAL_DECL,
6507 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL, 7387 VISIT_OPTIONAL_INITIALIZING_FORMAL_DECL,
6508 VISIT_NAMED_INITIALIZING_FORMAL_DECL, 7388 VISIT_NAMED_INITIALIZING_FORMAL_DECL,
6509 7389
6510 ERROR_UNRESOLVED_POSTFIX, 7390 VISIT_UNRESOLVED_COMPOUND,
7391 VISIT_UNRESOLVED_PREFIX,
7392 VISIT_UNRESOLVED_POSTFIX,
6511 7393
6512 // TODO(johnniwinther): Add tests for more error cases. 7394 // TODO(johnniwinther): Add tests for more error cases.
6513 } 7395 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/analyze_unused_dart2js_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698