| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.semantics_visitor; | 5 library dart2js.semantics_visitor; |
| 6 | 6 |
| 7 import '../constants/expressions.dart'; | 7 import '../constants/expressions.dart'; |
| 8 import '../dart2jslib.dart' show invariant, MessageKind; | 8 import '../dart2jslib.dart' show invariant, MessageKind; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 /// | 1345 /// |
| 1346 R visitSuperIndexPostfix( | 1346 R visitSuperIndexPostfix( |
| 1347 Send node, | 1347 Send node, |
| 1348 MethodElement indexFunction, | 1348 MethodElement indexFunction, |
| 1349 MethodElement indexSetFunction, | 1349 MethodElement indexSetFunction, |
| 1350 Node index, | 1350 Node index, |
| 1351 IncDecOperator operator, | 1351 IncDecOperator operator, |
| 1352 A arg); | 1352 A arg); |
| 1353 | 1353 |
| 1354 /// Prefix operation on an index expression `operator super[index]` where | 1354 /// Prefix operation on an index expression `operator super[index]` where |
| 1355 /// 'operator []' and maybe also 'operator []=' is unresolved and the | 1355 /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and |
| 1356 /// operation is defined by [operator]. | 1356 /// the operation is defined by [operator]. |
| 1357 /// | 1357 /// |
| 1358 /// For instance: | 1358 /// For instance: |
| 1359 /// class B {} | 1359 /// class B { |
| 1360 /// operator []=(a, b) {} |
| 1361 /// } |
| 1360 /// class C extends B { | 1362 /// class C extends B { |
| 1361 /// m(a) => --super[a]; | 1363 /// m(a) => --super[a]; |
| 1362 /// } | 1364 /// } |
| 1363 /// | 1365 /// |
| 1364 R visitUnresolvedSuperGetterIndexPrefix( | 1366 R visitUnresolvedSuperGetterIndexPrefix( |
| 1365 Send node, | 1367 Send node, |
| 1366 Element element, | 1368 Element element, |
| 1369 MethodElement setter, |
| 1367 Node index, | 1370 Node index, |
| 1368 IncDecOperator operator, | 1371 IncDecOperator operator, |
| 1369 A arg); | 1372 A arg); |
| 1370 | 1373 |
| 1371 /// Postfix operation on an index expression `super[index] operator` where | 1374 /// Postfix operation on an index expression `super[index] operator` where |
| 1372 /// 'operator []' and maybe also 'operator []=' is unresolved and the | 1375 /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and |
| 1373 /// operation is defined by [operator]. | 1376 /// the operation is defined by [operator]. |
| 1374 /// | 1377 /// |
| 1375 /// For instance: | 1378 /// For instance: |
| 1376 /// class B {} | 1379 /// class B { |
| 1380 /// operator []=(a, b) {} |
| 1381 /// } |
| 1377 /// class C extends B { | 1382 /// class C extends B { |
| 1378 /// m(a) => super[a]++; | 1383 /// m(a) => super[a]++; |
| 1379 /// } | 1384 /// } |
| 1380 /// | 1385 /// |
| 1381 R visitUnresolvedSuperGetterIndexPostfix( | 1386 R visitUnresolvedSuperGetterIndexPostfix( |
| 1382 Send node, | 1387 Send node, |
| 1383 Element element, | 1388 Element element, |
| 1389 MethodElement setter, |
| 1384 Node index, | 1390 Node index, |
| 1385 IncDecOperator operator, | 1391 IncDecOperator operator, |
| 1386 A arg); | 1392 A arg); |
| 1387 | 1393 |
| 1388 /// Prefix operation on an index expression `operator super[index]` where | 1394 /// Prefix operation on an index expression `operator super[index]` where |
| 1389 /// 'operator []' is implemented on a superclass by [indexFunction] and | 1395 /// 'operator []' is implemented on a superclass by [indexFunction] and |
| 1390 /// 'operator []=' is unresolved and the operation is defined by [operator]. | 1396 /// 'operator []=' is unresolved and the operation is defined by [operator]. |
| 1391 /// | 1397 /// |
| 1392 /// For instance: | 1398 /// For instance: |
| 1393 /// class B {} | 1399 /// class B { |
| 1400 /// operator [](_) => 42; |
| 1401 /// } |
| 1394 /// class C extends B { | 1402 /// class C extends B { |
| 1395 /// m(a) => --super[a]; | 1403 /// m(a) => --super[a]; |
| 1396 /// } | 1404 /// } |
| 1397 /// | 1405 /// |
| 1398 R visitUnresolvedSuperSetterIndexPrefix( | 1406 R visitUnresolvedSuperSetterIndexPrefix( |
| 1399 Send node, | 1407 Send node, |
| 1400 MethodElement indexFunction, | 1408 MethodElement indexFunction, |
| 1401 Element element, | 1409 Element element, |
| 1402 Node index, | 1410 Node index, |
| 1403 IncDecOperator operator, | 1411 IncDecOperator operator, |
| 1404 A arg); | 1412 A arg); |
| 1405 | 1413 |
| 1406 /// Postfix operation on an index expression `super[index] operator` where | 1414 /// Postfix operation on an index expression `super[index] operator` where |
| 1407 /// 'operator []' is implemented on a superclass by [indexFunction] and | 1415 /// 'operator []' is implemented on a superclass by [indexFunction] and |
| 1408 /// 'operator []=' is unresolved and the operation is defined by [operator]. | 1416 /// 'operator []=' is unresolved and the operation is defined by [operator]. |
| 1409 /// | 1417 /// |
| 1410 /// For instance: | 1418 /// For instance: |
| 1411 /// class B {} | 1419 /// class B { |
| 1420 /// operator [](_) => 42; |
| 1421 /// } |
| 1412 /// class C extends B { | 1422 /// class C extends B { |
| 1413 /// m(a) => super[a]++; | 1423 /// m(a) => super[a]++; |
| 1414 /// } | 1424 /// } |
| 1415 /// | 1425 /// |
| 1416 R visitUnresolvedSuperSetterIndexPostfix( | 1426 R visitUnresolvedSuperSetterIndexPostfix( |
| 1417 Send node, | 1427 Send node, |
| 1418 MethodElement indexFunction, | 1428 MethodElement indexFunction, |
| 1419 Element element, | 1429 Element element, |
| 1420 Node index, | 1430 Node index, |
| 1421 IncDecOperator operator, | 1431 IncDecOperator operator, |
| 1422 A arg); | 1432 A arg); |
| 1423 | 1433 |
| 1434 /// Prefix operation on an index expression `super[index] operator` where |
| 1435 /// both 'operator []' and 'operator []=' are unresolved and the operation is |
| 1436 /// defined by [operator]. |
| 1437 /// |
| 1438 /// For instance: |
| 1439 /// class B { |
| 1440 /// operator [](_) => 42; |
| 1441 /// } |
| 1442 /// class C extends B { |
| 1443 /// m(a) => super[a]++; |
| 1444 /// } |
| 1445 /// |
| 1446 R visitUnresolvedSuperIndexPrefix( |
| 1447 Send node, |
| 1448 Element element, |
| 1449 Node index, |
| 1450 IncDecOperator operator, |
| 1451 A arg); |
| 1452 |
| 1453 /// Postfix operation on an index expression `super[index] operator` where |
| 1454 /// both 'operator []' and 'operator []=' are unresolved and the operation is |
| 1455 /// defined by [operator]. |
| 1456 /// |
| 1457 /// For instance: |
| 1458 /// class B { |
| 1459 /// operator [](_) => 42; |
| 1460 /// } |
| 1461 /// class C extends B { |
| 1462 /// m(a) => super[a]++; |
| 1463 /// } |
| 1464 /// |
| 1465 R visitUnresolvedSuperIndexPostfix( |
| 1466 Send node, |
| 1467 Element element, |
| 1468 Node index, |
| 1469 IncDecOperator operator, |
| 1470 A arg); |
| 1471 |
| 1424 /// Binary expression `left == right`. | 1472 /// Binary expression `left == right`. |
| 1425 /// | 1473 /// |
| 1426 /// For instance: | 1474 /// For instance: |
| 1427 /// neq(a, b) => a != b; | 1475 /// neq(a, b) => a != b; |
| 1428 /// | 1476 /// |
| 1429 R visitNotEquals( | 1477 R visitNotEquals( |
| 1430 Send node, | 1478 Send node, |
| 1431 Node left, | 1479 Node left, |
| 1432 Node right, | 1480 Node right, |
| 1433 A arg); | 1481 A arg); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1685 AssignmentOperator operator, | 1733 AssignmentOperator operator, |
| 1686 Node rhs, | 1734 Node rhs, |
| 1687 A arg); | 1735 A arg); |
| 1688 | 1736 |
| 1689 /// Compound assignment expression of [rhs] with [operator] on a final | 1737 /// Compound assignment expression of [rhs] with [operator] on a final |
| 1690 /// [parameter]. | 1738 /// [parameter]. |
| 1691 /// | 1739 /// |
| 1692 /// For instance: | 1740 /// For instance: |
| 1693 /// m(final parameter, rhs) => parameter += rhs; | 1741 /// m(final parameter, rhs) => parameter += rhs; |
| 1694 /// | 1742 /// |
| 1695 R errorFinalParameterCompound( | 1743 R visitFinalParameterCompound( |
| 1696 Send node, | 1744 Send node, |
| 1697 ParameterElement parameter, | 1745 ParameterElement parameter, |
| 1698 AssignmentOperator operator, | 1746 AssignmentOperator operator, |
| 1699 Node rhs, | 1747 Node rhs, |
| 1700 A arg); | 1748 A arg); |
| 1701 | 1749 |
| 1702 /// Compound assignment expression of [rhs] with [operator] on a local | 1750 /// Compound assignment expression of [rhs] with [operator] on a local |
| 1703 /// [variable]. | 1751 /// [variable]. |
| 1704 /// | 1752 /// |
| 1705 /// For instance: | 1753 /// For instance: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1717 | 1765 |
| 1718 /// Compound assignment expression of [rhs] with [operator] on a final local | 1766 /// Compound assignment expression of [rhs] with [operator] on a final local |
| 1719 /// [variable]. | 1767 /// [variable]. |
| 1720 /// | 1768 /// |
| 1721 /// For instance: | 1769 /// For instance: |
| 1722 /// m(rhs) { | 1770 /// m(rhs) { |
| 1723 /// final variable = 0; | 1771 /// final variable = 0; |
| 1724 /// variable += rhs; | 1772 /// variable += rhs; |
| 1725 /// } | 1773 /// } |
| 1726 /// | 1774 /// |
| 1727 R errorFinalLocalVariableCompound( | 1775 R visitFinalLocalVariableCompound( |
| 1728 Send node, | 1776 Send node, |
| 1729 LocalVariableElement variable, | 1777 LocalVariableElement variable, |
| 1730 AssignmentOperator operator, | 1778 AssignmentOperator operator, |
| 1731 Node rhs, | 1779 Node rhs, |
| 1732 A arg); | 1780 A arg); |
| 1733 | 1781 |
| 1734 /// Compound assignment expression of [rhs] with [operator] on a local | 1782 /// Compound assignment expression of [rhs] with [operator] on a local |
| 1735 /// [function]. | 1783 /// [function]. |
| 1736 /// | 1784 /// |
| 1737 /// For instance: | 1785 /// For instance: |
| 1738 /// m(rhs) { | 1786 /// m(rhs) { |
| 1739 /// function() {} | 1787 /// function() {} |
| 1740 /// function += rhs; | 1788 /// function += rhs; |
| 1741 /// } | 1789 /// } |
| 1742 /// | 1790 /// |
| 1743 R errorLocalFunctionCompound( | 1791 R visitLocalFunctionCompound( |
| 1744 Send node, | 1792 Send node, |
| 1745 LocalFunctionElement function, | 1793 LocalFunctionElement function, |
| 1746 AssignmentOperator operator, | 1794 AssignmentOperator operator, |
| 1747 Node rhs, | 1795 Node rhs, |
| 1748 A arg); | 1796 A arg); |
| 1749 | 1797 |
| 1750 /// Compound assignment expression of [rhs] with [operator] on a static | 1798 /// Compound assignment expression of [rhs] with [operator] on a static |
| 1751 /// [field]. | 1799 /// [field]. |
| 1752 /// | 1800 /// |
| 1753 /// For instance: | 1801 /// For instance: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1765 | 1813 |
| 1766 /// Compound assignment expression of [rhs] with [operator] on a final static | 1814 /// Compound assignment expression of [rhs] with [operator] on a final static |
| 1767 /// [field]. | 1815 /// [field]. |
| 1768 /// | 1816 /// |
| 1769 /// For instance: | 1817 /// For instance: |
| 1770 /// class C { | 1818 /// class C { |
| 1771 /// static final field = 0; | 1819 /// static final field = 0; |
| 1772 /// m(rhs) => field += rhs; | 1820 /// m(rhs) => field += rhs; |
| 1773 /// } | 1821 /// } |
| 1774 /// | 1822 /// |
| 1775 R errorFinalStaticFieldCompound( | 1823 R visitFinalStaticFieldCompound( |
| 1776 Send node, | 1824 Send node, |
| 1777 FieldElement field, | 1825 FieldElement field, |
| 1778 AssignmentOperator operator, | 1826 AssignmentOperator operator, |
| 1779 Node rhs, | 1827 Node rhs, |
| 1780 A arg); | 1828 A arg); |
| 1781 | 1829 |
| 1782 /// Compound assignment expression of [rhs] with [operator] reading from a | 1830 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 1783 /// static [getter] and writing to a static [setter]. | 1831 /// static [getter] and writing to a static [setter]. |
| 1784 /// | 1832 /// |
| 1785 /// For instance: | 1833 /// For instance: |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1803 /// | 1851 /// |
| 1804 /// For instance: | 1852 /// For instance: |
| 1805 /// class C { | 1853 /// class C { |
| 1806 /// static o() {} | 1854 /// static o() {} |
| 1807 /// static set o(_) {} | 1855 /// static set o(_) {} |
| 1808 /// m(rhs) => o += rhs; | 1856 /// m(rhs) => o += rhs; |
| 1809 /// } | 1857 /// } |
| 1810 /// | 1858 /// |
| 1811 R visitStaticMethodSetterCompound( | 1859 R visitStaticMethodSetterCompound( |
| 1812 Send node, | 1860 Send node, |
| 1813 FunctionElement method, | 1861 MethodElement method, |
| 1814 FunctionElement setter, | 1862 MethodElement setter, |
| 1815 AssignmentOperator operator, | 1863 AssignmentOperator operator, |
| 1816 Node rhs, | 1864 Node rhs, |
| 1817 A arg); | 1865 A arg); |
| 1818 | 1866 |
| 1819 /// Compound assignment expression of [rhs] with [operator] on a top level | 1867 /// Compound assignment expression of [rhs] with [operator] on a top level |
| 1820 /// [field]. | 1868 /// [field]. |
| 1821 /// | 1869 /// |
| 1822 /// For instance: | 1870 /// For instance: |
| 1823 /// var field; | 1871 /// var field; |
| 1824 /// m(rhs) => field += rhs; | 1872 /// m(rhs) => field += rhs; |
| 1825 /// | 1873 /// |
| 1826 R visitTopLevelFieldCompound( | 1874 R visitTopLevelFieldCompound( |
| 1827 Send node, | 1875 Send node, |
| 1828 FieldElement field, | 1876 FieldElement field, |
| 1829 AssignmentOperator operator, | 1877 AssignmentOperator operator, |
| 1830 Node rhs, | 1878 Node rhs, |
| 1831 A arg); | 1879 A arg); |
| 1832 | 1880 |
| 1833 /// Compound assignment expression of [rhs] with [operator] on a final top | 1881 /// Compound assignment expression of [rhs] with [operator] on a final top |
| 1834 /// level [field]. | 1882 /// level [field]. |
| 1835 /// | 1883 /// |
| 1836 /// For instance: | 1884 /// For instance: |
| 1837 /// final field = 0; | 1885 /// final field = 0; |
| 1838 /// m(rhs) => field += rhs; | 1886 /// m(rhs) => field += rhs; |
| 1839 /// | 1887 /// |
| 1840 R errorFinalTopLevelFieldCompound( | 1888 R visitFinalTopLevelFieldCompound( |
| 1841 Send node, | 1889 Send node, |
| 1842 FieldElement field, | 1890 FieldElement field, |
| 1843 AssignmentOperator operator, | 1891 AssignmentOperator operator, |
| 1844 Node rhs, | 1892 Node rhs, |
| 1845 A arg); | 1893 A arg); |
| 1846 | 1894 |
| 1847 /// Compound assignment expression of [rhs] with [operator] reading from a | 1895 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 1848 /// top level [getter] and writing to a top level [setter]. | 1896 /// top level [getter] and writing to a top level [setter]. |
| 1849 /// | 1897 /// |
| 1850 /// For instance: | 1898 /// For instance: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1870 /// m(rhs) => o += rhs; | 1918 /// m(rhs) => o += rhs; |
| 1871 /// | 1919 /// |
| 1872 R visitTopLevelMethodSetterCompound( | 1920 R visitTopLevelMethodSetterCompound( |
| 1873 Send node, | 1921 Send node, |
| 1874 FunctionElement method, | 1922 FunctionElement method, |
| 1875 FunctionElement setter, | 1923 FunctionElement setter, |
| 1876 AssignmentOperator operator, | 1924 AssignmentOperator operator, |
| 1877 Node rhs, | 1925 Node rhs, |
| 1878 A arg); | 1926 A arg); |
| 1879 | 1927 |
| 1928 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 1929 /// top level [method], that is, closurizing [method], and writing to an |
| 1930 /// unresolved setter. |
| 1931 /// |
| 1932 /// For instance: |
| 1933 /// o() {} |
| 1934 /// m(rhs) => o += rhs; |
| 1935 /// |
| 1936 R visitTopLevelMethodCompound( |
| 1937 Send node, |
| 1938 FunctionElement method, |
| 1939 AssignmentOperator operator, |
| 1940 Node rhs, |
| 1941 A arg); |
| 1942 |
| 1880 /// Compound assignment expression of [rhs] with [operator] on a super | 1943 /// Compound assignment expression of [rhs] with [operator] on a super |
| 1881 /// [field]. | 1944 /// [field]. |
| 1882 /// | 1945 /// |
| 1883 /// For instance: | 1946 /// For instance: |
| 1884 /// class B { | 1947 /// class B { |
| 1885 /// var field; | 1948 /// var field; |
| 1886 /// } | 1949 /// } |
| 1887 /// class C extends B { | 1950 /// class C extends B { |
| 1888 /// m(rhs) => super.field += rhs; | 1951 /// m(rhs) => super.field += rhs; |
| 1889 /// } | 1952 /// } |
| 1890 /// | 1953 /// |
| 1891 R visitSuperFieldCompound( | 1954 R visitSuperFieldCompound( |
| 1892 Send node, | 1955 Send node, |
| 1893 FieldElement field, | 1956 FieldElement field, |
| 1894 AssignmentOperator operator, | 1957 AssignmentOperator operator, |
| 1895 Node rhs, | 1958 Node rhs, |
| 1896 A arg); | 1959 A arg); |
| 1897 | 1960 |
| 1898 /// Compound assignment expression of [rhs] with [operator] on a final super | 1961 /// Compound assignment expression of [rhs] with [operator] on a final super |
| 1899 /// [field]. | 1962 /// [field]. |
| 1900 /// | 1963 /// |
| 1901 /// For instance: | 1964 /// For instance: |
| 1902 /// class B { | 1965 /// class B { |
| 1903 /// final field = 0; | 1966 /// final field = 42; |
| 1904 /// } | 1967 /// } |
| 1905 /// class C extends B { | 1968 /// class C extends B { |
| 1906 /// m(rhs) => super.field += rhs; | 1969 /// m(rhs) => super.field += rhs; |
| 1907 /// } | 1970 /// } |
| 1908 /// | 1971 /// |
| 1909 R errorFinalSuperFieldCompound( | 1972 R visitFinalSuperFieldCompound( |
| 1910 Send node, | 1973 Send node, |
| 1911 FieldElement field, | 1974 FieldElement field, |
| 1912 AssignmentOperator operator, | 1975 AssignmentOperator operator, |
| 1913 Node rhs, | 1976 Node rhs, |
| 1914 A arg); | 1977 A arg); |
| 1978 |
| 1979 /// Prefix expression with [operator] on a final super [field]. |
| 1980 /// |
| 1981 /// For instance: |
| 1982 /// class B { |
| 1983 /// final field = 42; |
| 1984 /// } |
| 1985 /// class C extends B { |
| 1986 /// m(rhs) => ++super.field; |
| 1987 /// } |
| 1988 /// |
| 1989 R visitFinalSuperFieldPrefix( |
| 1990 Send node, |
| 1991 FieldElement field, |
| 1992 IncDecOperator operator, |
| 1993 A arg); |
| 1994 |
| 1995 /// Prefix expression with [operator] on an unresolved super property. |
| 1996 /// |
| 1997 /// For instance: |
| 1998 /// class B { |
| 1999 /// } |
| 2000 /// class C extends B { |
| 2001 /// m(rhs) => ++super.unresolved; |
| 2002 /// } |
| 2003 /// |
| 2004 R visitUnresolvedSuperPrefix( |
| 2005 Send node, |
| 2006 Element element, |
| 2007 IncDecOperator operator, |
| 2008 A arg); |
| 2009 |
| 2010 /// Postfix expression with [operator] on an unresolved super property. |
| 2011 /// |
| 2012 /// For instance: |
| 2013 /// class B { |
| 2014 /// } |
| 2015 /// class C extends B { |
| 2016 /// m(rhs) => super.unresolved++; |
| 2017 /// } |
| 2018 /// |
| 2019 R visitUnresolvedSuperPostfix( |
| 2020 Send node, |
| 2021 Element element, |
| 2022 IncDecOperator operator, |
| 2023 A arg); |
| 2024 |
| 2025 /// Compound assignment expression of [rhs] with [operator] on an unresolved |
| 2026 /// super property. |
| 2027 /// |
| 2028 /// For instance: |
| 2029 /// class B { |
| 2030 /// } |
| 2031 /// class C extends B { |
| 2032 /// m(rhs) => super.unresolved += rhs; |
| 2033 /// } |
| 2034 /// |
| 2035 R visitUnresolvedSuperCompound( |
| 2036 Send node, |
| 2037 Element element, |
| 2038 AssignmentOperator operator, |
| 2039 Node rhs, |
| 2040 A arg); |
| 2041 |
| 2042 /// Postfix expression with [operator] on a final super [field]. |
| 2043 /// |
| 2044 /// For instance: |
| 2045 /// class B { |
| 2046 /// final field = 42; |
| 2047 /// } |
| 2048 /// class C extends B { |
| 2049 /// m(rhs) => super.field++; |
| 2050 /// } |
| 2051 /// |
| 2052 R visitFinalSuperFieldPostfix( |
| 2053 Send node, |
| 2054 FieldElement field, |
| 2055 IncDecOperator operator, |
| 2056 A arg); |
| 2057 |
| 2058 /// Compound assignment expression of [rhs] with [operator] reading from the |
| 2059 /// super field [readField] and writing to the different super field |
| 2060 /// [writtenField]. |
| 2061 /// |
| 2062 /// For instance: |
| 2063 /// class A { |
| 2064 /// var field; |
| 2065 /// } |
| 2066 /// class B extends A { |
| 2067 /// final field; |
| 2068 /// } |
| 2069 /// class C extends B { |
| 2070 /// m() => super.field += rhs; |
| 2071 /// } |
| 2072 /// |
| 2073 R visitSuperFieldFieldCompound( |
| 2074 Send node, |
| 2075 FieldElement readField, |
| 2076 FieldElement writtenField, |
| 2077 AssignmentOperator operator, |
| 2078 Node rhs, |
| 2079 A arg); |
| 1915 | 2080 |
| 1916 /// Compound assignment expression of [rhs] with [operator] reading from a | 2081 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 1917 /// super [getter] and writing to a super [setter]. | 2082 /// super [getter] and writing to a super [setter]. |
| 1918 /// | 2083 /// |
| 1919 /// For instance: | 2084 /// For instance: |
| 1920 /// class B { | 2085 /// class B { |
| 1921 /// get o => 0; | 2086 /// get o => 0; |
| 1922 /// set o(_) {} | 2087 /// set o(_) {} |
| 1923 /// } | 2088 /// } |
| 1924 /// class C extends B { | 2089 /// class C extends B { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1947 /// } | 2112 /// } |
| 1948 /// | 2113 /// |
| 1949 R visitSuperMethodSetterCompound( | 2114 R visitSuperMethodSetterCompound( |
| 1950 Send node, | 2115 Send node, |
| 1951 FunctionElement method, | 2116 FunctionElement method, |
| 1952 FunctionElement setter, | 2117 FunctionElement setter, |
| 1953 AssignmentOperator operator, | 2118 AssignmentOperator operator, |
| 1954 Node rhs, | 2119 Node rhs, |
| 1955 A arg); | 2120 A arg); |
| 1956 | 2121 |
| 2122 /// Compound assignment expression of [rhs] with [operator] reading the |
| 2123 /// closurized super [method] and trying to invoke the non-existing setter. |
| 2124 /// |
| 2125 /// For instance: |
| 2126 /// class B { |
| 2127 /// o() {} |
| 2128 /// } |
| 2129 /// class C extends B { |
| 2130 /// m(rhs) => super.o += rhs; |
| 2131 /// } |
| 2132 /// |
| 2133 R visitSuperMethodCompound( |
| 2134 Send node, |
| 2135 FunctionElement method, |
| 2136 AssignmentOperator operator, |
| 2137 Node rhs, |
| 2138 A arg); |
| 2139 |
| 2140 /// Compound assignment expression of [rhs] with [operator] reading from the |
| 2141 /// non-existing super getter and writing to a super [setter]. |
| 2142 /// |
| 2143 /// For instance |
| 2144 /// class B { |
| 2145 /// set o(_) {} |
| 2146 /// } |
| 2147 /// class C extends B { |
| 2148 /// m(rhs) => super.o += rhs; |
| 2149 /// } |
| 2150 /// |
| 2151 R visitUnresolvedSuperGetterCompound( |
| 2152 Send node, |
| 2153 Element element, |
| 2154 MethodElement setter, |
| 2155 AssignmentOperator operator, |
| 2156 Node rhs, |
| 2157 A arg); |
| 2158 |
| 2159 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 2160 /// super [getter] and writing to the non-existing super setter. |
| 2161 /// |
| 2162 /// For instance |
| 2163 /// class B { |
| 2164 /// get o => 42; |
| 2165 /// } |
| 2166 /// class C extends B { |
| 2167 /// m(rhs) => super.o += rhs; |
| 2168 /// } |
| 2169 /// |
| 2170 R visitUnresolvedSuperSetterCompound( |
| 2171 Send node, |
| 2172 MethodElement getter, |
| 2173 Element element, |
| 2174 AssignmentOperator operator, |
| 2175 Node rhs, |
| 2176 A arg); |
| 2177 |
| 1957 /// Compound assignment expression of [rhs] with [operator] reading from a | 2178 /// Compound assignment expression of [rhs] with [operator] reading from a |
| 1958 /// super [field] and writing to a super [setter]. | 2179 /// super [field] and writing to a super [setter]. |
| 1959 /// | 2180 /// |
| 1960 /// For instance: | 2181 /// For instance: |
| 1961 /// class A { | 2182 /// class A { |
| 1962 /// var o; | 2183 /// var o; |
| 1963 /// } | 2184 /// } |
| 1964 /// class B extends A { | 2185 /// class B extends A { |
| 1965 /// set o(_) {} | 2186 /// set o(_) {} |
| 1966 /// } | 2187 /// } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 Node rhs, | 2219 Node rhs, |
| 1999 A arg); | 2220 A arg); |
| 2000 | 2221 |
| 2001 /// Compound assignment expression of [rhs] with [operator] on a type literal | 2222 /// Compound assignment expression of [rhs] with [operator] on a type literal |
| 2002 /// for class [element]. | 2223 /// for class [element]. |
| 2003 /// | 2224 /// |
| 2004 /// For instance: | 2225 /// For instance: |
| 2005 /// class C {} | 2226 /// class C {} |
| 2006 /// m(rhs) => C += rhs; | 2227 /// m(rhs) => C += rhs; |
| 2007 /// | 2228 /// |
| 2008 R errorClassTypeLiteralCompound( | 2229 R visitClassTypeLiteralCompound( |
| 2009 Send node, | 2230 Send node, |
| 2010 ConstantExpression constant, | 2231 ConstantExpression constant, |
| 2011 AssignmentOperator operator, | 2232 AssignmentOperator operator, |
| 2012 Node rhs, | 2233 Node rhs, |
| 2013 A arg); | 2234 A arg); |
| 2014 | 2235 |
| 2015 /// Compound assignment expression of [rhs] with [operator] on a type literal | 2236 /// Compound assignment expression of [rhs] with [operator] on a type literal |
| 2016 /// for typedef [element]. | 2237 /// for typedef [element]. |
| 2017 /// | 2238 /// |
| 2018 /// For instance: | 2239 /// For instance: |
| 2019 /// typedef F(); | 2240 /// typedef F(); |
| 2020 /// m(rhs) => F += rhs; | 2241 /// m(rhs) => F += rhs; |
| 2021 /// | 2242 /// |
| 2022 R errorTypedefTypeLiteralCompound( | 2243 R visitTypedefTypeLiteralCompound( |
| 2023 Send node, | 2244 Send node, |
| 2024 ConstantExpression constant, | 2245 ConstantExpression constant, |
| 2025 AssignmentOperator operator, | 2246 AssignmentOperator operator, |
| 2026 Node rhs, | 2247 Node rhs, |
| 2027 A arg); | 2248 A arg); |
| 2028 | 2249 |
| 2029 /// Compound assignment expression of [rhs] with [operator] on a type literal | 2250 /// Compound assignment expression of [rhs] with [operator] on a type literal |
| 2030 /// for type variable [element]. | 2251 /// for type variable [element]. |
| 2031 /// | 2252 /// |
| 2032 /// For instance: | 2253 /// For instance: |
| 2033 /// class C<T> { | 2254 /// class C<T> { |
| 2034 /// m(rhs) => T += rhs; | 2255 /// m(rhs) => T += rhs; |
| 2035 /// } | 2256 /// } |
| 2036 /// | 2257 /// |
| 2037 R errorTypeVariableTypeLiteralCompound( | 2258 R visitTypeVariableTypeLiteralCompound( |
| 2038 Send node, | 2259 Send node, |
| 2039 TypeVariableElement element, | 2260 TypeVariableElement element, |
| 2040 AssignmentOperator operator, | 2261 AssignmentOperator operator, |
| 2041 Node rhs, | 2262 Node rhs, |
| 2042 A arg); | 2263 A arg); |
| 2043 | 2264 |
| 2044 /// Compound assignment expression of [rhs] with [operator] on the type | 2265 /// Compound assignment expression of [rhs] with [operator] on the type |
| 2045 /// literal for `dynamic`. | 2266 /// literal for `dynamic`. |
| 2046 /// | 2267 /// |
| 2047 /// For instance: | 2268 /// For instance: |
| 2048 /// m(rhs) => dynamic += rhs; | 2269 /// m(rhs) => dynamic += rhs; |
| 2049 /// | 2270 /// |
| 2050 R errorDynamicTypeLiteralCompound( | 2271 R visitDynamicTypeLiteralCompound( |
| 2051 Send node, | 2272 Send node, |
| 2052 ConstantExpression constant, | 2273 ConstantExpression constant, |
| 2053 AssignmentOperator operator, | 2274 AssignmentOperator operator, |
| 2054 Node rhs, | 2275 Node rhs, |
| 2055 A arg); | 2276 A arg); |
| 2056 | 2277 |
| 2057 /// Compound index assignment of [rhs] with [operator] to [index] on the | 2278 /// Compound index assignment of [rhs] with [operator] to [index] on the |
| 2058 /// index operators of [receiver] whose getter and setter are defined by | 2279 /// index operators of [receiver] whose getter and setter are defined by |
| 2059 /// [getterSelector] and [setterSelector], respectively. | 2280 /// [getterSelector] and [setterSelector], respectively. |
| 2060 /// | 2281 /// |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2084 R visitSuperCompoundIndexSet( | 2305 R visitSuperCompoundIndexSet( |
| 2085 SendSet node, | 2306 SendSet node, |
| 2086 MethodElement getter, | 2307 MethodElement getter, |
| 2087 MethodElement setter, | 2308 MethodElement setter, |
| 2088 Node index, | 2309 Node index, |
| 2089 AssignmentOperator operator, | 2310 AssignmentOperator operator, |
| 2090 Node rhs, | 2311 Node rhs, |
| 2091 A arg); | 2312 A arg); |
| 2092 | 2313 |
| 2093 /// Compound index assignment of [rhs] with [operator] to [index] on a super | 2314 /// Compound index assignment of [rhs] with [operator] to [index] on a super |
| 2094 /// super class where the index getter is undefined. The index setter might | 2315 /// super class where the index getter is undefined and the index setter is |
| 2095 /// also be undefined. | 2316 /// defined by [setter]. |
| 2096 /// | 2317 /// |
| 2097 /// For instance | 2318 /// For instance |
| 2098 /// class B { | 2319 /// class B { |
| 2099 /// } | 2320 /// } |
| 2100 /// class C extends B { | 2321 /// class C extends B { |
| 2101 /// m() => super[1] += 42; | 2322 /// m() => super[1] += 42; |
| 2102 /// } | 2323 /// } |
| 2103 /// | 2324 /// |
| 2104 R visitUnresolvedSuperGetterCompoundIndexSet( | 2325 R visitUnresolvedSuperGetterCompoundIndexSet( |
| 2105 Send node, | 2326 Send node, |
| 2106 Element element, | 2327 Element element, |
| 2328 MethodElement setter, |
| 2107 Node index, | 2329 Node index, |
| 2108 AssignmentOperator operator, | 2330 AssignmentOperator operator, |
| 2109 Node rhs, | 2331 Node rhs, |
| 2110 A arg); | 2332 A arg); |
| 2111 | 2333 |
| 2112 /// Compound index assignment of [rhs] with [operator] to [index] on a super | 2334 /// Compound index assignment of [rhs] with [operator] to [index] on a super |
| 2113 /// super class where the index getter is defined by [getter] but the index | 2335 /// super class where the index getter is defined by [getter] but the index |
| 2114 /// setter is undefined. | 2336 /// setter is undefined. |
| 2115 /// | 2337 /// |
| 2116 /// For instance | 2338 /// For instance |
| 2117 /// class B { | 2339 /// class B { |
| 2118 /// operator [](index) => 42; | 2340 /// operator [](index) => 42; |
| 2119 /// } | 2341 /// } |
| 2120 /// class C extends B { | 2342 /// class C extends B { |
| 2121 /// m() => super[1] += 42; | 2343 /// m() => super[1] += 42; |
| 2122 /// } | 2344 /// } |
| 2123 /// | 2345 /// |
| 2124 R visitUnresolvedSuperSetterCompoundIndexSet( | 2346 R visitUnresolvedSuperSetterCompoundIndexSet( |
| 2125 Send node, | 2347 Send node, |
| 2126 MethodElement getter, | 2348 MethodElement getter, |
| 2127 Element element, | 2349 Element element, |
| 2128 Node index, | 2350 Node index, |
| 2129 AssignmentOperator operator, | 2351 AssignmentOperator operator, |
| 2130 Node rhs, | 2352 Node rhs, |
| 2131 A arg); | 2353 A arg); |
| 2132 | 2354 |
| 2355 /// Compound index assignment of [rhs] with [operator] to [index] on a super |
| 2356 /// super class where the index getter and setter are undefined. |
| 2357 /// |
| 2358 /// For instance |
| 2359 /// class B { |
| 2360 /// } |
| 2361 /// class C extends B { |
| 2362 /// m() => super[1] += 42; |
| 2363 /// } |
| 2364 /// |
| 2365 R visitUnresolvedSuperCompoundIndexSet( |
| 2366 Send node, |
| 2367 Element element, |
| 2368 Node index, |
| 2369 AssignmentOperator operator, |
| 2370 Node rhs, |
| 2371 A arg); |
| 2372 |
| 2133 /// Prefix expression with [operator] of the property on [receiver] whose | 2373 /// Prefix expression with [operator] of the property on [receiver] whose |
| 2134 /// getter and setter are defined by [getterSelector] and [setterSelector], | 2374 /// getter and setter are defined by [getterSelector] and [setterSelector], |
| 2135 /// respectively. | 2375 /// respectively. |
| 2136 /// | 2376 /// |
| 2137 /// For instance: | 2377 /// For instance: |
| 2138 /// m(receiver) => ++receiver.foo; | 2378 /// m(receiver) => ++receiver.foo; |
| 2139 /// | 2379 /// |
| 2140 R visitDynamicPropertyPrefix( | 2380 R visitDynamicPropertyPrefix( |
| 2141 Send node, | 2381 Send node, |
| 2142 Node receiver, | 2382 Node receiver, |
| 2143 IncDecOperator operator, | 2383 IncDecOperator operator, |
| 2144 Selector getterSelector, | 2384 Selector getterSelector, |
| 2145 Selector setterSelector, | 2385 Selector setterSelector, |
| 2146 A arg); | 2386 A arg); |
| 2147 | 2387 |
| 2148 /// Prefix expression with [operator] on a [parameter]. | 2388 /// Prefix expression with [operator] on a [parameter]. |
| 2149 /// | 2389 /// |
| 2150 /// For instance: | 2390 /// For instance: |
| 2151 /// m(parameter) => ++parameter; | 2391 /// m(parameter) => ++parameter; |
| 2152 /// | 2392 /// |
| 2153 R visitParameterPrefix( | 2393 R visitParameterPrefix( |
| 2154 Send node, | 2394 Send node, |
| 2155 ParameterElement parameter, | 2395 ParameterElement parameter, |
| 2156 IncDecOperator operator, | 2396 IncDecOperator operator, |
| 2157 A arg); | 2397 A arg); |
| 2158 | 2398 |
| 2399 /// Prefix expression with [operator] on a final [parameter]. |
| 2400 /// |
| 2401 /// For instance: |
| 2402 /// m(final parameter) => ++parameter; |
| 2403 /// |
| 2404 R visitFinalParameterPrefix( |
| 2405 Send node, |
| 2406 ParameterElement parameter, |
| 2407 IncDecOperator operator, |
| 2408 A arg); |
| 2409 |
| 2159 /// Prefix expression with [operator] on a local [variable]. | 2410 /// Prefix expression with [operator] on a local [variable]. |
| 2160 /// | 2411 /// |
| 2161 /// For instance: | 2412 /// For instance: |
| 2162 /// m() { | 2413 /// m() { |
| 2163 /// var variable; | 2414 /// var variable; |
| 2164 /// ++variable; | 2415 /// ++variable; |
| 2165 /// } | 2416 /// } |
| 2166 /// | 2417 /// |
| 2167 R visitLocalVariablePrefix( | 2418 R visitLocalVariablePrefix( |
| 2168 Send node, | 2419 Send node, |
| 2169 LocalVariableElement variable, | 2420 LocalVariableElement variable, |
| 2170 IncDecOperator operator, | 2421 IncDecOperator operator, |
| 2171 A arg); | 2422 A arg); |
| 2172 | 2423 |
| 2424 /// Prefix expression with [operator] on a final local [variable]. |
| 2425 /// |
| 2426 /// For instance: |
| 2427 /// m() { |
| 2428 /// final variable; |
| 2429 /// ++variable; |
| 2430 /// } |
| 2431 /// |
| 2432 R visitFinalLocalVariablePrefix( |
| 2433 Send node, |
| 2434 LocalVariableElement variable, |
| 2435 IncDecOperator operator, |
| 2436 A arg); |
| 2437 |
| 2173 /// Prefix expression with [operator] on a local [function]. | 2438 /// Prefix expression with [operator] on a local [function]. |
| 2174 /// | 2439 /// |
| 2175 /// For instance: | 2440 /// For instance: |
| 2176 /// m() { | 2441 /// m() { |
| 2177 /// function() {} | 2442 /// function() {} |
| 2178 /// ++function; | 2443 /// ++function; |
| 2179 /// } | 2444 /// } |
| 2180 /// | 2445 /// |
| 2181 R errorLocalFunctionPrefix( | 2446 R visitLocalFunctionPrefix( |
| 2182 Send node, | 2447 Send node, |
| 2183 LocalFunctionElement function, | 2448 LocalFunctionElement function, |
| 2184 IncDecOperator operator, | 2449 IncDecOperator operator, |
| 2185 A arg); | 2450 A arg); |
| 2186 | 2451 |
| 2187 | 2452 |
| 2188 /// Prefix expression with [operator] of the property on `this` whose getter | 2453 /// Prefix expression with [operator] of the property on `this` whose getter |
| 2189 /// and setter are defined by [getterSelector] and [setterSelector], | 2454 /// and setter are defined by [getterSelector] and [setterSelector], |
| 2190 /// respectively. | 2455 /// respectively. |
| 2191 /// | 2456 /// |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2212 /// static var field; | 2477 /// static var field; |
| 2213 /// m() => ++field; | 2478 /// m() => ++field; |
| 2214 /// } | 2479 /// } |
| 2215 /// | 2480 /// |
| 2216 R visitStaticFieldPrefix( | 2481 R visitStaticFieldPrefix( |
| 2217 Send node, | 2482 Send node, |
| 2218 FieldElement field, | 2483 FieldElement field, |
| 2219 IncDecOperator operator, | 2484 IncDecOperator operator, |
| 2220 A arg); | 2485 A arg); |
| 2221 | 2486 |
| 2487 /// Prefix expression with [operator] on a final static [field]. |
| 2488 /// |
| 2489 /// For instance: |
| 2490 /// class C { |
| 2491 /// static final field = 42; |
| 2492 /// m() => ++field; |
| 2493 /// } |
| 2494 /// |
| 2495 R visitFinalStaticFieldPrefix( |
| 2496 Send node, |
| 2497 FieldElement field, |
| 2498 IncDecOperator operator, |
| 2499 A arg); |
| 2500 |
| 2222 /// Prefix expression with [operator] reading from a static [getter] and | 2501 /// Prefix expression with [operator] reading from a static [getter] and |
| 2223 /// writing to a static [setter]. | 2502 /// writing to a static [setter]. |
| 2224 /// | 2503 /// |
| 2225 /// For instance: | 2504 /// For instance: |
| 2226 /// class C { | 2505 /// class C { |
| 2227 /// static get o => 0; | 2506 /// static get o => 0; |
| 2228 /// static set o(_) {} | 2507 /// static set o(_) {} |
| 2229 /// m() => ++o; | 2508 /// m() => ++o; |
| 2230 /// } | 2509 /// } |
| 2231 /// | 2510 /// |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2259 /// For instance: | 2538 /// For instance: |
| 2260 /// var field; | 2539 /// var field; |
| 2261 /// m() => ++field; | 2540 /// m() => ++field; |
| 2262 /// | 2541 /// |
| 2263 R visitTopLevelFieldPrefix( | 2542 R visitTopLevelFieldPrefix( |
| 2264 Send node, | 2543 Send node, |
| 2265 FieldElement field, | 2544 FieldElement field, |
| 2266 IncDecOperator operator, | 2545 IncDecOperator operator, |
| 2267 A arg); | 2546 A arg); |
| 2268 | 2547 |
| 2548 /// Prefix expression with [operator] on a final top level [field]. |
| 2549 /// |
| 2550 /// For instance: |
| 2551 /// final field; |
| 2552 /// m() => ++field; |
| 2553 /// |
| 2554 R visitFinalTopLevelFieldPrefix( |
| 2555 Send node, |
| 2556 FieldElement field, |
| 2557 IncDecOperator operator, |
| 2558 A arg); |
| 2559 |
| 2269 /// Prefix expression with [operator] reading from a top level [getter] and | 2560 /// Prefix expression with [operator] reading from a top level [getter] and |
| 2270 /// writing to a top level [setter]. | 2561 /// writing to a top level [setter]. |
| 2271 /// | 2562 /// |
| 2272 /// For instance: | 2563 /// For instance: |
| 2273 /// get o => 0; | 2564 /// get o => 0; |
| 2274 /// set o(_) {} | 2565 /// set o(_) {} |
| 2275 /// m() => ++o; | 2566 /// m() => ++o; |
| 2276 /// | 2567 /// |
| 2277 R visitTopLevelGetterSetterPrefix( | 2568 R visitTopLevelGetterSetterPrefix( |
| 2278 Send node, | 2569 Send node, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2407 /// m() => ++super.o; | 2698 /// m() => ++super.o; |
| 2408 /// } | 2699 /// } |
| 2409 /// | 2700 /// |
| 2410 R visitSuperMethodSetterPrefix( | 2701 R visitSuperMethodSetterPrefix( |
| 2411 Send node, | 2702 Send node, |
| 2412 FunctionElement method, | 2703 FunctionElement method, |
| 2413 FunctionElement setter, | 2704 FunctionElement setter, |
| 2414 IncDecOperator operator, | 2705 IncDecOperator operator, |
| 2415 A arg); | 2706 A arg); |
| 2416 | 2707 |
| 2708 /// Prefix expression with [operator] reading from a super [method], that is, |
| 2709 /// closurizing [method], and writing to an unresolved super setter. |
| 2710 /// |
| 2711 /// For instance: |
| 2712 /// class B { |
| 2713 /// o() {} |
| 2714 /// set o(_) {} |
| 2715 /// } |
| 2716 /// class C extends B { |
| 2717 /// m() => ++super.o; |
| 2718 /// } |
| 2719 /// |
| 2720 R visitSuperMethodPrefix( |
| 2721 Send node, |
| 2722 FunctionElement method, |
| 2723 IncDecOperator operator, |
| 2724 A arg); |
| 2725 |
| 2726 /// Prefix expression with [operator] reading from an unresolved super getter |
| 2727 /// and writing to a super [setter]. |
| 2728 /// |
| 2729 /// For instance |
| 2730 /// class B { |
| 2731 /// set o(_) {} |
| 2732 /// } |
| 2733 /// class C extends B { |
| 2734 /// m() => ++super.o; |
| 2735 /// } |
| 2736 /// |
| 2737 /// |
| 2738 R visitUnresolvedSuperGetterPrefix( |
| 2739 Send node, |
| 2740 Element element, |
| 2741 MethodElement setter, |
| 2742 IncDecOperator operator, |
| 2743 A arg); |
| 2744 |
| 2745 /// Prefix expression with [operator] reading from a super [getter] and |
| 2746 /// writing to an unresolved super setter. |
| 2747 /// |
| 2748 /// For instance |
| 2749 /// class B { |
| 2750 /// get o => 42 |
| 2751 /// } |
| 2752 /// class C extends B { |
| 2753 /// m() => ++super.o; |
| 2754 /// } |
| 2755 /// |
| 2756 /// |
| 2757 R visitUnresolvedSuperSetterPrefix( |
| 2758 Send node, |
| 2759 MethodElement getter, |
| 2760 Element element, |
| 2761 IncDecOperator operator, |
| 2762 A arg); |
| 2763 |
| 2417 /// Prefix expression with [operator] on a type literal for a class [element]. | 2764 /// Prefix expression with [operator] on a type literal for a class [element]. |
| 2418 /// | 2765 /// |
| 2419 /// For instance: | 2766 /// For instance: |
| 2420 /// class C {} | 2767 /// class C {} |
| 2421 /// m() => ++C; | 2768 /// m() => ++C; |
| 2422 /// | 2769 /// |
| 2423 R errorClassTypeLiteralPrefix( | 2770 R visitClassTypeLiteralPrefix( |
| 2424 Send node, | 2771 Send node, |
| 2425 ConstantExpression constant, | 2772 ConstantExpression constant, |
| 2426 IncDecOperator operator, | 2773 IncDecOperator operator, |
| 2427 A arg); | 2774 A arg); |
| 2428 | 2775 |
| 2429 /// Prefix expression with [operator] on a type literal for a typedef | 2776 /// Prefix expression with [operator] on a type literal for a typedef |
| 2430 /// [element]. | 2777 /// [element]. |
| 2431 /// | 2778 /// |
| 2432 /// For instance: | 2779 /// For instance: |
| 2433 /// typedef F(); | 2780 /// typedef F(); |
| 2434 /// m() => ++F; | 2781 /// m() => ++F; |
| 2435 /// | 2782 /// |
| 2436 R errorTypedefTypeLiteralPrefix( | 2783 R visitTypedefTypeLiteralPrefix( |
| 2437 Send node, | 2784 Send node, |
| 2438 ConstantExpression constant, | 2785 ConstantExpression constant, |
| 2439 IncDecOperator operator, | 2786 IncDecOperator operator, |
| 2440 A arg); | 2787 A arg); |
| 2441 | 2788 |
| 2442 /// Prefix expression with [operator] on a type literal for a type variable | 2789 /// Prefix expression with [operator] on a type literal for a type variable |
| 2443 /// [element]. | 2790 /// [element]. |
| 2444 /// | 2791 /// |
| 2445 /// For instance: | 2792 /// For instance: |
| 2446 /// class C<T> { | 2793 /// class C<T> { |
| 2447 /// m() => ++T; | 2794 /// m() => ++T; |
| 2448 /// } | 2795 /// } |
| 2449 /// | 2796 /// |
| 2450 R errorTypeVariableTypeLiteralPrefix( | 2797 R visitTypeVariableTypeLiteralPrefix( |
| 2451 Send node, | 2798 Send node, |
| 2452 TypeVariableElement element, | 2799 TypeVariableElement element, |
| 2453 IncDecOperator operator, | 2800 IncDecOperator operator, |
| 2454 A arg); | 2801 A arg); |
| 2455 | 2802 |
| 2456 /// Prefix expression with [operator] on the type literal for `dynamic`. | 2803 /// Prefix expression with [operator] on the type literal for `dynamic`. |
| 2457 /// | 2804 /// |
| 2458 /// For instance: | 2805 /// For instance: |
| 2459 /// m() => ++dynamic; | 2806 /// m() => ++dynamic; |
| 2460 /// | 2807 /// |
| 2461 R errorDynamicTypeLiteralPrefix( | 2808 R visitDynamicTypeLiteralPrefix( |
| 2462 Send node, | 2809 Send node, |
| 2463 ConstantExpression constant, | 2810 ConstantExpression constant, |
| 2464 IncDecOperator operator, | 2811 IncDecOperator operator, |
| 2465 A arg); | 2812 A arg); |
| 2466 | 2813 |
| 2467 /// Postfix expression with [operator] of the property on [receiver] whose | 2814 /// Postfix expression with [operator] of the property on [receiver] whose |
| 2468 /// getter and setter are defined by [getterSelector] and [setterSelector], | 2815 /// getter and setter are defined by [getterSelector] and [setterSelector], |
| 2469 /// respectively. | 2816 /// respectively. |
| 2470 /// | 2817 /// |
| 2471 /// For instance: | 2818 /// For instance: |
| (...skipping 11 matching lines...) Expand all Loading... |
| 2483 /// | 2830 /// |
| 2484 /// For instance: | 2831 /// For instance: |
| 2485 /// m(parameter) => parameter++; | 2832 /// m(parameter) => parameter++; |
| 2486 /// | 2833 /// |
| 2487 R visitParameterPostfix( | 2834 R visitParameterPostfix( |
| 2488 Send node, | 2835 Send node, |
| 2489 ParameterElement parameter, | 2836 ParameterElement parameter, |
| 2490 IncDecOperator operator, | 2837 IncDecOperator operator, |
| 2491 A arg); | 2838 A arg); |
| 2492 | 2839 |
| 2840 /// Postfix expression with [operator] on a final [parameter]. |
| 2841 /// |
| 2842 /// For instance: |
| 2843 /// m(final parameter) => parameter++; |
| 2844 /// |
| 2845 R visitFinalParameterPostfix( |
| 2846 Send node, |
| 2847 ParameterElement parameter, |
| 2848 IncDecOperator operator, |
| 2849 A arg); |
| 2850 |
| 2493 /// Postfix expression with [operator] on a local [variable]. | 2851 /// Postfix expression with [operator] on a local [variable]. |
| 2494 /// | 2852 /// |
| 2495 /// For instance: | 2853 /// For instance: |
| 2496 /// m() { | 2854 /// m() { |
| 2497 /// var variable; | 2855 /// var variable; |
| 2498 /// variable++; | 2856 /// variable++; |
| 2499 /// } | 2857 /// } |
| 2500 /// | 2858 /// |
| 2501 R visitLocalVariablePostfix( | 2859 R visitLocalVariablePostfix( |
| 2502 Send node, | 2860 Send node, |
| 2503 LocalVariableElement variable, | 2861 LocalVariableElement variable, |
| 2504 IncDecOperator operator, | 2862 IncDecOperator operator, |
| 2505 A arg); | 2863 A arg); |
| 2506 | 2864 |
| 2865 /// Postfix expression with [operator] on a final local [variable]. |
| 2866 /// |
| 2867 /// For instance: |
| 2868 /// m() { |
| 2869 /// final variable; |
| 2870 /// variable++; |
| 2871 /// } |
| 2872 /// |
| 2873 R visitFinalLocalVariablePostfix( |
| 2874 Send node, |
| 2875 LocalVariableElement variable, |
| 2876 IncDecOperator operator, |
| 2877 A arg); |
| 2878 |
| 2507 /// Postfix expression with [operator] on a local [function]. | 2879 /// Postfix expression with [operator] on a local [function]. |
| 2508 /// | 2880 /// |
| 2509 /// For instance: | 2881 /// For instance: |
| 2510 /// m() { | 2882 /// m() { |
| 2511 /// function() {} | 2883 /// function() {} |
| 2512 /// function++; | 2884 /// function++; |
| 2513 /// } | 2885 /// } |
| 2514 /// | 2886 /// |
| 2515 R errorLocalFunctionPostfix( | 2887 R visitLocalFunctionPostfix( |
| 2516 Send node, | 2888 Send node, |
| 2517 LocalFunctionElement function, | 2889 LocalFunctionElement function, |
| 2518 IncDecOperator operator, | 2890 IncDecOperator operator, |
| 2519 A arg); | 2891 A arg); |
| 2520 | 2892 |
| 2521 | 2893 |
| 2522 /// Postfix expression with [operator] of the property on `this` whose getter | 2894 /// Postfix expression with [operator] of the property on `this` whose getter |
| 2523 /// and setter are defined by [getterSelector] and [setterSelector], | 2895 /// and setter are defined by [getterSelector] and [setterSelector], |
| 2524 /// respectively. | 2896 /// respectively. |
| 2525 /// | 2897 /// |
| (...skipping 20 matching lines...) Expand all Loading... |
| 2546 /// static var field; | 2918 /// static var field; |
| 2547 /// m() => field++; | 2919 /// m() => field++; |
| 2548 /// } | 2920 /// } |
| 2549 /// | 2921 /// |
| 2550 R visitStaticFieldPostfix( | 2922 R visitStaticFieldPostfix( |
| 2551 Send node, | 2923 Send node, |
| 2552 FieldElement field, | 2924 FieldElement field, |
| 2553 IncDecOperator operator, | 2925 IncDecOperator operator, |
| 2554 A arg); | 2926 A arg); |
| 2555 | 2927 |
| 2928 /// Postfix expression with [operator] on a final static [field]. |
| 2929 /// |
| 2930 /// For instance: |
| 2931 /// class C { |
| 2932 /// static final field; |
| 2933 /// m() => field++; |
| 2934 /// } |
| 2935 /// |
| 2936 R visitFinalStaticFieldPostfix( |
| 2937 Send node, |
| 2938 FieldElement field, |
| 2939 IncDecOperator operator, |
| 2940 A arg); |
| 2941 |
| 2556 /// Postfix expression with [operator] reading from a static [getter] and | 2942 /// Postfix expression with [operator] reading from a static [getter] and |
| 2557 /// writing to a static [setter]. | 2943 /// writing to a static [setter]. |
| 2558 /// | 2944 /// |
| 2559 /// For instance: | 2945 /// For instance: |
| 2560 /// class C { | 2946 /// class C { |
| 2561 /// static get o => 0; | 2947 /// static get o => 0; |
| 2562 /// static set o(_) {} | 2948 /// static set o(_) {} |
| 2563 /// m() => o++; | 2949 /// m() => o++; |
| 2564 /// } | 2950 /// } |
| 2565 /// | 2951 /// |
| (...skipping 27 matching lines...) Expand all Loading... |
| 2593 /// For instance: | 2979 /// For instance: |
| 2594 /// var field; | 2980 /// var field; |
| 2595 /// m() => field++; | 2981 /// m() => field++; |
| 2596 /// | 2982 /// |
| 2597 R visitTopLevelFieldPostfix( | 2983 R visitTopLevelFieldPostfix( |
| 2598 Send node, | 2984 Send node, |
| 2599 FieldElement field, | 2985 FieldElement field, |
| 2600 IncDecOperator operator, | 2986 IncDecOperator operator, |
| 2601 A arg); | 2987 A arg); |
| 2602 | 2988 |
| 2989 /// Postfix expression with [operator] on a final top level [field]. |
| 2990 /// |
| 2991 /// For instance: |
| 2992 /// final field = 42; |
| 2993 /// m() => field++; |
| 2994 /// |
| 2995 R visitFinalTopLevelFieldPostfix( |
| 2996 Send node, |
| 2997 FieldElement field, |
| 2998 IncDecOperator operator, |
| 2999 A arg); |
| 3000 |
| 2603 /// Postfix expression with [operator] reading from a top level [getter] and | 3001 /// Postfix expression with [operator] reading from a top level [getter] and |
| 2604 /// writing to a top level [setter]. | 3002 /// writing to a top level [setter]. |
| 2605 /// | 3003 /// |
| 2606 /// For instance: | 3004 /// For instance: |
| 2607 /// get o => 0; | 3005 /// get o => 0; |
| 2608 /// set o(_) {} | 3006 /// set o(_) {} |
| 2609 /// m() => o++; | 3007 /// m() => o++; |
| 2610 /// | 3008 /// |
| 2611 R visitTopLevelGetterSetterPostfix( | 3009 R visitTopLevelGetterSetterPostfix( |
| 2612 Send node, | 3010 Send node, |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 /// m() => super.o++; | 3139 /// m() => super.o++; |
| 2742 /// } | 3140 /// } |
| 2743 /// | 3141 /// |
| 2744 R visitSuperMethodSetterPostfix( | 3142 R visitSuperMethodSetterPostfix( |
| 2745 Send node, | 3143 Send node, |
| 2746 FunctionElement method, | 3144 FunctionElement method, |
| 2747 FunctionElement setter, | 3145 FunctionElement setter, |
| 2748 IncDecOperator operator, | 3146 IncDecOperator operator, |
| 2749 A arg); | 3147 A arg); |
| 2750 | 3148 |
| 3149 /// Postfix expression with [operator] reading from a super [method], that is, |
| 3150 /// closurizing [method], and writing to an unresolved super. |
| 3151 /// |
| 3152 /// For instance: |
| 3153 /// class B { |
| 3154 /// o() {} |
| 3155 /// set o(_) {} |
| 3156 /// } |
| 3157 /// class C extends B { |
| 3158 /// m() => super.o++; |
| 3159 /// } |
| 3160 /// |
| 3161 R visitSuperMethodPostfix( |
| 3162 Send node, |
| 3163 FunctionElement method, |
| 3164 IncDecOperator operator, |
| 3165 A arg); |
| 3166 |
| 3167 /// Prefix expression with [operator] reading from an unresolved super getter |
| 3168 /// and writing to a super [setter]. |
| 3169 /// |
| 3170 /// For instance |
| 3171 /// class B { |
| 3172 /// set o(_) {} |
| 3173 /// } |
| 3174 /// class C extends B { |
| 3175 /// m() => super.o++; |
| 3176 /// } |
| 3177 /// |
| 3178 /// |
| 3179 R visitUnresolvedSuperGetterPostfix( |
| 3180 Send node, |
| 3181 Element element, |
| 3182 MethodElement setter, |
| 3183 IncDecOperator operator, |
| 3184 A arg); |
| 3185 |
| 3186 /// Prefix expression with [operator] reading from a super [getter] and |
| 3187 /// writing to an unresolved super setter. |
| 3188 /// |
| 3189 /// For instance |
| 3190 /// class B { |
| 3191 /// get o => 42 |
| 3192 /// } |
| 3193 /// class C extends B { |
| 3194 /// m() => super.o++; |
| 3195 /// } |
| 3196 /// |
| 3197 /// |
| 3198 R visitUnresolvedSuperSetterPostfix( |
| 3199 Send node, |
| 3200 MethodElement getter, |
| 3201 Element element, |
| 3202 IncDecOperator operator, |
| 3203 A arg); |
| 3204 |
| 2751 /// Postfix expression with [operator] on a type literal for a class | 3205 /// Postfix expression with [operator] on a type literal for a class |
| 2752 /// [element]. | 3206 /// [element]. |
| 2753 /// | 3207 /// |
| 2754 /// For instance: | 3208 /// For instance: |
| 2755 /// class C {} | 3209 /// class C {} |
| 2756 /// m() => C++; | 3210 /// m() => C++; |
| 2757 /// | 3211 /// |
| 2758 R errorClassTypeLiteralPostfix( | 3212 R visitClassTypeLiteralPostfix( |
| 2759 Send node, | 3213 Send node, |
| 2760 ConstantExpression constant, | 3214 ConstantExpression constant, |
| 2761 IncDecOperator operator, | 3215 IncDecOperator operator, |
| 2762 A arg); | 3216 A arg); |
| 2763 | 3217 |
| 2764 /// Postfix expression with [operator] on a type literal for a typedef | 3218 /// Postfix expression with [operator] on a type literal for a typedef |
| 2765 /// [element]. | 3219 /// [element]. |
| 2766 /// | 3220 /// |
| 2767 /// For instance: | 3221 /// For instance: |
| 2768 /// typedef F(); | 3222 /// typedef F(); |
| 2769 /// m() => F++; | 3223 /// m() => F++; |
| 2770 /// | 3224 /// |
| 2771 R errorTypedefTypeLiteralPostfix( | 3225 R visitTypedefTypeLiteralPostfix( |
| 2772 Send node, | 3226 Send node, |
| 2773 ConstantExpression constant, | 3227 ConstantExpression constant, |
| 2774 IncDecOperator operator, | 3228 IncDecOperator operator, |
| 2775 A arg); | 3229 A arg); |
| 2776 | 3230 |
| 2777 /// Postfix expression with [operator] on a type literal for a type variable | 3231 /// Postfix expression with [operator] on a type literal for a type variable |
| 2778 /// [element]. | 3232 /// [element]. |
| 2779 /// | 3233 /// |
| 2780 /// For instance: | 3234 /// For instance: |
| 2781 /// class C<T> { | 3235 /// class C<T> { |
| 2782 /// m() => T++; | 3236 /// m() => T++; |
| 2783 /// } | 3237 /// } |
| 2784 /// | 3238 /// |
| 2785 R errorTypeVariableTypeLiteralPostfix( | 3239 R visitTypeVariableTypeLiteralPostfix( |
| 2786 Send node, | 3240 Send node, |
| 2787 TypeVariableElement element, | 3241 TypeVariableElement element, |
| 2788 IncDecOperator operator, | 3242 IncDecOperator operator, |
| 2789 A arg); | 3243 A arg); |
| 2790 | 3244 |
| 2791 /// Postfix expression with [operator] on the type literal for `dynamic`. | 3245 /// Postfix expression with [operator] on the type literal for `dynamic`. |
| 2792 /// | 3246 /// |
| 2793 /// For instance: | 3247 /// For instance: |
| 2794 /// m() => dynamic++; | 3248 /// m() => dynamic++; |
| 2795 /// | 3249 /// |
| 2796 R errorDynamicTypeLiteralPostfix( | 3250 R visitDynamicTypeLiteralPostfix( |
| 2797 Send node, | 3251 Send node, |
| 2798 ConstantExpression constant, | 3252 ConstantExpression constant, |
| 2799 IncDecOperator operator, | 3253 IncDecOperator operator, |
| 2800 A arg); | 3254 A arg); |
| 2801 | 3255 |
| 2802 /// Read of the [constant]. | 3256 /// Read of the [constant]. |
| 2803 /// | 3257 /// |
| 2804 /// For instance | 3258 /// For instance |
| 2805 /// const c = c; | 3259 /// const c = c; |
| 2806 /// m() => c; | 3260 /// m() => c; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2901 /// m() => super.foo(); | 3355 /// m() => super.foo(); |
| 2902 /// } | 3356 /// } |
| 2903 /// | 3357 /// |
| 2904 R visitUnresolvedSuperInvoke( | 3358 R visitUnresolvedSuperInvoke( |
| 2905 Send node, | 3359 Send node, |
| 2906 Element element, | 3360 Element element, |
| 2907 NodeList arguments, | 3361 NodeList arguments, |
| 2908 Selector selector, | 3362 Selector selector, |
| 2909 A arg); | 3363 A arg); |
| 2910 | 3364 |
| 2911 /// Compound assignment of [rhs] on the unresolved [element]. | 3365 /// Compound assignment of [rhs] with [operator] reading from the |
| 3366 /// non-existing static getter and writing to the static [setter]. |
| 3367 /// |
| 3368 /// For instance |
| 3369 /// class C { |
| 3370 /// set foo(_) {} |
| 3371 /// } |
| 3372 /// m1() => C.foo += 42; |
| 3373 /// |
| 3374 R visitUnresolvedStaticGetterCompound( |
| 3375 Send node, |
| 3376 Element element, |
| 3377 MethodElement setter, |
| 3378 AssignmentOperator operator, |
| 3379 Node rhs, |
| 3380 A arg); |
| 3381 |
| 3382 /// Compound assignment of [rhs] with [operator] reading from the |
| 3383 /// non-existing top level getter and writing to the top level [setter]. |
| 3384 /// |
| 3385 /// For instance |
| 3386 /// set foo(_) {} |
| 3387 /// m1() => foo += 42; |
| 3388 /// |
| 3389 R visitUnresolvedTopLevelGetterCompound( |
| 3390 Send node, |
| 3391 Element element, |
| 3392 MethodElement setter, |
| 3393 AssignmentOperator operator, |
| 3394 Node rhs, |
| 3395 A arg); |
| 3396 |
| 3397 /// Compound assignment of [rhs] with [operator] reading from the static |
| 3398 /// [getter] and writing to the non-existing static setter. |
| 3399 /// |
| 3400 /// For instance |
| 3401 /// class C { |
| 3402 /// get foo => 42; |
| 3403 /// } |
| 3404 /// m1() => C.foo += 42; |
| 3405 /// |
| 3406 R visitUnresolvedStaticSetterCompound( |
| 3407 Send node, |
| 3408 MethodElement getter, |
| 3409 Element element, |
| 3410 AssignmentOperator operator, |
| 3411 Node rhs, |
| 3412 A arg); |
| 3413 |
| 3414 /// Compound assignment of [rhs] with [operator] reading from the top level |
| 3415 /// [getter] and writing to the non-existing top level setter. |
| 3416 /// |
| 3417 /// For instance |
| 3418 /// get foo => 42; |
| 3419 /// m1() => foo += 42; |
| 3420 /// |
| 3421 R visitUnresolvedTopLevelSetterCompound( |
| 3422 Send node, |
| 3423 MethodElement getter, |
| 3424 Element element, |
| 3425 AssignmentOperator operator, |
| 3426 Node rhs, |
| 3427 A arg); |
| 3428 |
| 3429 /// Compound assignment of [rhs] with [operator] reading the closurized static |
| 3430 /// [method] and trying to invoke the non-existing setter. |
| 3431 /// |
| 3432 /// For instance |
| 3433 /// class C { |
| 3434 /// foo() {} |
| 3435 /// } |
| 3436 /// m1() => C.foo += 42; |
| 3437 /// |
| 3438 R visitStaticMethodCompound( |
| 3439 Send node, |
| 3440 MethodElement method, |
| 3441 AssignmentOperator operator, |
| 3442 Node rhs, |
| 3443 A arg); |
| 3444 |
| 3445 /// Compound assignment of [rhs] where both getter and setter are unresolved. |
| 2912 /// | 3446 /// |
| 2913 /// For instance | 3447 /// For instance |
| 2914 /// class C {} | 3448 /// class C {} |
| 2915 /// m1() => unresolved += 42; | 3449 /// m1() => unresolved += 42; |
| 2916 /// m2() => prefix.unresolved += 42; | 3450 /// m2() => prefix.unresolved += 42; |
| 2917 /// m3() => Unresolved.foo += 42; | 3451 /// m3() => Unresolved.foo += 42; |
| 2918 /// m4() => unresolved.foo += 42; | 3452 /// m4() => unresolved.foo += 42; |
| 2919 /// m5() => unresolved.Foo.bar += 42; | 3453 /// m5() => unresolved.Foo.bar += 42; |
| 2920 /// m6() => C.unresolved += 42; | 3454 /// m6() => C.unresolved += 42; |
| 2921 /// m7() => prefix.C.unresolved += 42; | 3455 /// m7() => prefix.C.unresolved += 42; |
| 2922 /// | 3456 /// |
| 2923 // TODO(johnniwinther): Split the cases in which a prefix is resolved. | 3457 // TODO(johnniwinther): Split the cases in which a prefix is resolved. |
| 2924 R errorUnresolvedCompound( | 3458 R visitUnresolvedCompound( |
| 2925 Send node, | 3459 Send node, |
| 2926 Element element, | 3460 Element element, |
| 2927 AssignmentOperator operator, | 3461 AssignmentOperator operator, |
| 2928 Node rhs, | 3462 Node rhs, |
| 2929 A arg); | 3463 A arg); |
| 2930 | 3464 |
| 2931 /// Prefix operation on the unresolved [element]. | 3465 /// Prefix operation of [operator] reading from the non-existing static getter |
| 3466 /// and writing to the static [setter]. |
| 3467 /// |
| 3468 /// For instance |
| 3469 /// class C { |
| 3470 /// set foo(_) {} |
| 3471 /// } |
| 3472 /// m1() => ++C.foo; |
| 3473 /// |
| 3474 R visitUnresolvedStaticGetterPrefix( |
| 3475 Send node, |
| 3476 Element element, |
| 3477 MethodElement setter, |
| 3478 IncDecOperator operator, |
| 3479 A arg); |
| 3480 |
| 3481 /// Prefix operation of [operator] reading from the non-existing top level |
| 3482 /// getter and writing to the top level [setter]. |
| 3483 /// |
| 3484 /// For instance |
| 3485 /// set foo(_) {} |
| 3486 /// m1() => ++foo; |
| 3487 /// |
| 3488 R visitUnresolvedTopLevelGetterPrefix( |
| 3489 Send node, |
| 3490 Element element, |
| 3491 MethodElement setter, |
| 3492 IncDecOperator operator, |
| 3493 A arg); |
| 3494 |
| 3495 /// Prefix operation of [operator] reading from the static [getter] and |
| 3496 /// writing to the non-existing static setter. |
| 3497 /// |
| 3498 /// For instance |
| 3499 /// class C { |
| 3500 /// get foo => 42; |
| 3501 /// } |
| 3502 /// m1() => ++C.foo; |
| 3503 /// |
| 3504 R visitUnresolvedStaticSetterPrefix( |
| 3505 Send node, |
| 3506 MethodElement getter, |
| 3507 Element element, |
| 3508 IncDecOperator operator, |
| 3509 A arg); |
| 3510 |
| 3511 /// Postfix operation of [operator] reading from the top level [getter] and |
| 3512 /// writing to the non-existing top level setter. |
| 3513 /// |
| 3514 /// For instance |
| 3515 /// get foo => 42; |
| 3516 /// m1() => ++foo; |
| 3517 /// |
| 3518 R visitUnresolvedTopLevelSetterPrefix( |
| 3519 Send node, |
| 3520 MethodElement getter, |
| 3521 Element element, |
| 3522 IncDecOperator operator, |
| 3523 A arg); |
| 3524 |
| 3525 /// Prefix operation of [operator] reading the closurized static [method] and |
| 3526 /// trying to invoke the non-existing setter. |
| 3527 /// |
| 3528 /// For instance |
| 3529 /// class C { |
| 3530 /// foo() {} |
| 3531 /// } |
| 3532 /// m1() => ++C.foo; |
| 3533 /// |
| 3534 R visitStaticMethodPrefix( |
| 3535 Send node, |
| 3536 MethodElement method, |
| 3537 IncDecOperator operator, |
| 3538 A arg); |
| 3539 |
| 3540 /// Prefix operation of [operator] reading the closurized top level [method] |
| 3541 /// and trying to invoke the non-existing setter. |
| 3542 /// |
| 3543 /// For instance |
| 3544 /// class C { |
| 3545 /// foo() {} |
| 3546 /// } |
| 3547 /// m1() => ++C.foo; |
| 3548 /// |
| 3549 R visitTopLevelMethodPrefix( |
| 3550 Send node, |
| 3551 MethodElement method, |
| 3552 IncDecOperator operator, |
| 3553 A arg); |
| 3554 |
| 3555 /// Prefix operation where both getter and setter are unresolved. |
| 2932 /// | 3556 /// |
| 2933 /// For instance | 3557 /// For instance |
| 2934 /// class C {} | 3558 /// class C {} |
| 2935 /// m1() => ++unresolved; | 3559 /// m1() => ++unresolved; |
| 2936 /// m2() => ++prefix.unresolved; | 3560 /// m2() => ++prefix.unresolved; |
| 2937 /// m3() => ++Unresolved.foo; | 3561 /// m3() => ++Unresolved.foo; |
| 2938 /// m4() => ++unresolved.foo; | 3562 /// m4() => ++unresolved.foo; |
| 2939 /// m5() => ++unresolved.Foo.bar; | 3563 /// m5() => ++unresolved.Foo.bar; |
| 2940 /// m6() => ++C.unresolved; | 3564 /// m6() => ++C.unresolved; |
| 2941 /// m7() => ++prefix.C.unresolved; | 3565 /// m7() => ++prefix.C.unresolved; |
| 2942 /// | 3566 /// |
| 2943 // TODO(johnniwinther): Split the cases in which a prefix is resolved. | 3567 // TODO(johnniwinther): Split the cases in which a prefix is resolved. |
| 2944 R errorUnresolvedPrefix( | 3568 R visitUnresolvedPrefix( |
| 2945 Send node, | 3569 Send node, |
| 2946 Element element, | 3570 Element element, |
| 2947 IncDecOperator operator, | 3571 IncDecOperator operator, |
| 2948 A arg); | 3572 A arg); |
| 2949 | 3573 |
| 2950 /// Postfix operation on the unresolved [element]. | 3574 /// Postfix operation of [operator] reading from the non-existing static |
| 3575 /// getter and writing to the static [setter]. |
| 3576 /// |
| 3577 /// For instance |
| 3578 /// class C { |
| 3579 /// set foo(_) {} |
| 3580 /// } |
| 3581 /// m1() => C.foo++; |
| 3582 /// |
| 3583 R visitUnresolvedStaticGetterPostfix( |
| 3584 Send node, |
| 3585 Element element, |
| 3586 MethodElement setter, |
| 3587 IncDecOperator operator, |
| 3588 A arg); |
| 3589 |
| 3590 /// Postfix operation of [operator] reading from the non-existing top level |
| 3591 /// getter and writing to the top level [setter]. |
| 3592 /// |
| 3593 /// For instance |
| 3594 /// set foo(_) {} |
| 3595 /// m1() => foo++; |
| 3596 /// |
| 3597 R visitUnresolvedTopLevelGetterPostfix( |
| 3598 Send node, |
| 3599 Element element, |
| 3600 MethodElement setter, |
| 3601 IncDecOperator operator, |
| 3602 A arg); |
| 3603 |
| 3604 /// Postfix operation of [operator] reading from the static [getter] and |
| 3605 /// writing to the non-existing static setter. |
| 3606 /// |
| 3607 /// For instance |
| 3608 /// class C { |
| 3609 /// get foo => 42; |
| 3610 /// } |
| 3611 /// m1() => C.foo++; |
| 3612 /// |
| 3613 R visitUnresolvedStaticSetterPostfix( |
| 3614 Send node, |
| 3615 MethodElement getter, |
| 3616 Element element, |
| 3617 IncDecOperator operator, |
| 3618 A arg); |
| 3619 |
| 3620 /// Postfix operation of [operator] reading from the top level [getter] and |
| 3621 /// writing to the non-existing top level setter. |
| 3622 /// |
| 3623 /// For instance |
| 3624 /// get foo => 42; |
| 3625 /// m1() => foo++; |
| 3626 /// |
| 3627 R visitUnresolvedTopLevelSetterPostfix( |
| 3628 Send node, |
| 3629 MethodElement getter, |
| 3630 Element element, |
| 3631 IncDecOperator operator, |
| 3632 A arg); |
| 3633 |
| 3634 /// Postfix operation of [operator] reading the closurized static [method] and |
| 3635 /// trying to invoke the non-existing setter. |
| 3636 /// |
| 3637 /// For instance |
| 3638 /// class C { |
| 3639 /// foo() {} |
| 3640 /// } |
| 3641 /// m1() => C.foo++; |
| 3642 /// |
| 3643 R visitStaticMethodPostfix( |
| 3644 Send node, |
| 3645 MethodElement method, |
| 3646 IncDecOperator operator, |
| 3647 A arg); |
| 3648 |
| 3649 /// Postfix operation of [operator] reading the closurized top level [method] |
| 3650 /// and trying to invoke the non-existing setter. |
| 3651 /// |
| 3652 /// For instance |
| 3653 /// class C { |
| 3654 /// foo() {} |
| 3655 /// } |
| 3656 /// m1() => C.foo++; |
| 3657 /// |
| 3658 R visitTopLevelMethodPostfix( |
| 3659 Send node, |
| 3660 MethodElement method, |
| 3661 IncDecOperator operator, |
| 3662 A arg); |
| 3663 |
| 3664 /// Postfix operation where both getter and setter are unresolved. |
| 2951 /// | 3665 /// |
| 2952 /// For instance | 3666 /// For instance |
| 2953 /// class C {} | 3667 /// class C {} |
| 2954 /// m1() => unresolved++; | 3668 /// m1() => unresolved++; |
| 2955 /// m2() => prefix.unresolved++; | 3669 /// m2() => prefix.unresolved++; |
| 2956 /// m3() => Unresolved.foo++; | 3670 /// m3() => Unresolved.foo++; |
| 2957 /// m4() => unresolved.foo++; | 3671 /// m4() => unresolved.foo++; |
| 2958 /// m5() => unresolved.Foo.bar++; | 3672 /// m5() => unresolved.Foo.bar++; |
| 2959 /// m6() => C.unresolved++; | 3673 /// m6() => C.unresolved++; |
| 2960 /// m7() => prefix.C.unresolved++; | 3674 /// m7() => prefix.C.unresolved++; |
| 2961 /// | 3675 /// |
| 2962 // TODO(johnniwinther): Split the cases in which a prefix is resolved. | 3676 // TODO(johnniwinther): Split the cases in which a prefix is resolved. |
| 2963 R errorUnresolvedPostfix( | 3677 R visitUnresolvedPostfix( |
| 2964 Send node, | 3678 Send node, |
| 2965 Element element, | 3679 Element element, |
| 2966 IncDecOperator operator, | 3680 IncDecOperator operator, |
| 2967 A arg); | 3681 A arg); |
| 2968 | 3682 |
| 2969 /// Invocation of an undefined unary [operator] on [expression]. | 3683 /// Invocation of an undefined unary [operator] on [expression]. |
| 2970 R errorUndefinedUnaryExpression( | 3684 R errorUndefinedUnaryExpression( |
| 2971 Send node, | 3685 Send node, |
| 2972 Operator operator, | 3686 Operator operator, |
| 2973 Node expression, | 3687 Node expression, |
| (...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3707 /// C() : this._(42); | 4421 /// C() : this._(42); |
| 3708 /// } | 4422 /// } |
| 3709 /// | 4423 /// |
| 3710 R errorUnresolvedThisConstructorInvoke( | 4424 R errorUnresolvedThisConstructorInvoke( |
| 3711 Send node, | 4425 Send node, |
| 3712 Element element, | 4426 Element element, |
| 3713 NodeList arguments, | 4427 NodeList arguments, |
| 3714 Selector selector, | 4428 Selector selector, |
| 3715 A arg); | 4429 A arg); |
| 3716 } | 4430 } |
| OLD | NEW |