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

Side by Side Diff: pkg/compiler/lib/src/resolution/semantic_visitor.dart

Issue 1142293004: Revert "Refactor handling of compounds." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
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; 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
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 []' is unresolved, 'operator []=' is defined by [setter], and 1355 /// 'operator []' and maybe also 'operator []=' is unresolved and the
1356 /// the operation is defined by [operator]. 1356 /// operation is defined by [operator].
1357 /// 1357 ///
1358 /// For instance: 1358 /// For instance:
1359 /// class B { 1359 /// class B {}
1360 /// operator []=(a, b) {}
1361 /// }
1362 /// class C extends B { 1360 /// class C extends B {
1363 /// m(a) => --super[a]; 1361 /// m(a) => --super[a];
1364 /// } 1362 /// }
1365 /// 1363 ///
1366 R visitUnresolvedSuperGetterIndexPrefix( 1364 R visitUnresolvedSuperGetterIndexPrefix(
1367 Send node, 1365 Send node,
1368 Element element, 1366 Element element,
1369 MethodElement setter,
1370 Node index, 1367 Node index,
1371 IncDecOperator operator, 1368 IncDecOperator operator,
1372 A arg); 1369 A arg);
1373 1370
1374 /// Postfix operation on an index expression `super[index] operator` where 1371 /// Postfix operation on an index expression `super[index] operator` where
1375 /// 'operator []' is unresolved, 'operator []=' is defined by [setter], and 1372 /// 'operator []' and maybe also 'operator []=' is unresolved and the
1376 /// the operation is defined by [operator]. 1373 /// operation is defined by [operator].
1377 /// 1374 ///
1378 /// For instance: 1375 /// For instance:
1379 /// class B { 1376 /// class B {}
1380 /// operator []=(a, b) {}
1381 /// }
1382 /// class C extends B { 1377 /// class C extends B {
1383 /// m(a) => super[a]++; 1378 /// m(a) => super[a]++;
1384 /// } 1379 /// }
1385 /// 1380 ///
1386 R visitUnresolvedSuperGetterIndexPostfix( 1381 R visitUnresolvedSuperGetterIndexPostfix(
1387 Send node, 1382 Send node,
1388 Element element, 1383 Element element,
1389 MethodElement setter,
1390 Node index, 1384 Node index,
1391 IncDecOperator operator, 1385 IncDecOperator operator,
1392 A arg); 1386 A arg);
1393 1387
1394 /// Prefix operation on an index expression `operator super[index]` where 1388 /// Prefix operation on an index expression `operator super[index]` where
1395 /// 'operator []' is implemented on a superclass by [indexFunction] and 1389 /// 'operator []' is implemented on a superclass by [indexFunction] and
1396 /// 'operator []=' is unresolved and the operation is defined by [operator]. 1390 /// 'operator []=' is unresolved and the operation is defined by [operator].
1397 /// 1391 ///
1398 /// For instance: 1392 /// For instance:
1399 /// class B { 1393 /// class B {}
1400 /// operator [](_) => 42;
1401 /// }
1402 /// class C extends B { 1394 /// class C extends B {
1403 /// m(a) => --super[a]; 1395 /// m(a) => --super[a];
1404 /// } 1396 /// }
1405 /// 1397 ///
1406 R visitUnresolvedSuperSetterIndexPrefix( 1398 R visitUnresolvedSuperSetterIndexPrefix(
1407 Send node, 1399 Send node,
1408 MethodElement indexFunction, 1400 MethodElement indexFunction,
1409 Element element, 1401 Element element,
1410 Node index, 1402 Node index,
1411 IncDecOperator operator, 1403 IncDecOperator operator,
1412 A arg); 1404 A arg);
1413 1405
1414 /// Postfix operation on an index expression `super[index] operator` where 1406 /// Postfix operation on an index expression `super[index] operator` where
1415 /// 'operator []' is implemented on a superclass by [indexFunction] and 1407 /// 'operator []' is implemented on a superclass by [indexFunction] and
1416 /// 'operator []=' is unresolved and the operation is defined by [operator]. 1408 /// 'operator []=' is unresolved and the operation is defined by [operator].
1417 /// 1409 ///
1418 /// For instance: 1410 /// For instance:
1419 /// class B { 1411 /// class B {}
1420 /// operator [](_) => 42;
1421 /// }
1422 /// class C extends B { 1412 /// class C extends B {
1423 /// m(a) => super[a]++; 1413 /// m(a) => super[a]++;
1424 /// } 1414 /// }
1425 /// 1415 ///
1426 R visitUnresolvedSuperSetterIndexPostfix( 1416 R visitUnresolvedSuperSetterIndexPostfix(
1427 Send node, 1417 Send node,
1428 MethodElement indexFunction, 1418 MethodElement indexFunction,
1429 Element element, 1419 Element element,
1430 Node index, 1420 Node index,
1431 IncDecOperator operator, 1421 IncDecOperator operator,
1432 A arg); 1422 A arg);
1433 1423
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
1472 /// Binary expression `left == right`. 1424 /// Binary expression `left == right`.
1473 /// 1425 ///
1474 /// For instance: 1426 /// For instance:
1475 /// neq(a, b) => a != b; 1427 /// neq(a, b) => a != b;
1476 /// 1428 ///
1477 R visitNotEquals( 1429 R visitNotEquals(
1478 Send node, 1430 Send node,
1479 Node left, 1431 Node left,
1480 Node right, 1432 Node right,
1481 A arg); 1433 A arg);
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1733 AssignmentOperator operator, 1685 AssignmentOperator operator,
1734 Node rhs, 1686 Node rhs,
1735 A arg); 1687 A arg);
1736 1688
1737 /// Compound assignment expression of [rhs] with [operator] on a final 1689 /// Compound assignment expression of [rhs] with [operator] on a final
1738 /// [parameter]. 1690 /// [parameter].
1739 /// 1691 ///
1740 /// For instance: 1692 /// For instance:
1741 /// m(final parameter, rhs) => parameter += rhs; 1693 /// m(final parameter, rhs) => parameter += rhs;
1742 /// 1694 ///
1743 R visitFinalParameterCompound( 1695 R errorFinalParameterCompound(
1744 Send node, 1696 Send node,
1745 ParameterElement parameter, 1697 ParameterElement parameter,
1746 AssignmentOperator operator, 1698 AssignmentOperator operator,
1747 Node rhs, 1699 Node rhs,
1748 A arg); 1700 A arg);
1749 1701
1750 /// Compound assignment expression of [rhs] with [operator] on a local 1702 /// Compound assignment expression of [rhs] with [operator] on a local
1751 /// [variable]. 1703 /// [variable].
1752 /// 1704 ///
1753 /// For instance: 1705 /// For instance:
(...skipping 11 matching lines...) Expand all
1765 1717
1766 /// Compound assignment expression of [rhs] with [operator] on a final local 1718 /// Compound assignment expression of [rhs] with [operator] on a final local
1767 /// [variable]. 1719 /// [variable].
1768 /// 1720 ///
1769 /// For instance: 1721 /// For instance:
1770 /// m(rhs) { 1722 /// m(rhs) {
1771 /// final variable = 0; 1723 /// final variable = 0;
1772 /// variable += rhs; 1724 /// variable += rhs;
1773 /// } 1725 /// }
1774 /// 1726 ///
1775 R visitFinalLocalVariableCompound( 1727 R errorFinalLocalVariableCompound(
1776 Send node, 1728 Send node,
1777 LocalVariableElement variable, 1729 LocalVariableElement variable,
1778 AssignmentOperator operator, 1730 AssignmentOperator operator,
1779 Node rhs, 1731 Node rhs,
1780 A arg); 1732 A arg);
1781 1733
1782 /// Compound assignment expression of [rhs] with [operator] on a local 1734 /// Compound assignment expression of [rhs] with [operator] on a local
1783 /// [function]. 1735 /// [function].
1784 /// 1736 ///
1785 /// For instance: 1737 /// For instance:
1786 /// m(rhs) { 1738 /// m(rhs) {
1787 /// function() {} 1739 /// function() {}
1788 /// function += rhs; 1740 /// function += rhs;
1789 /// } 1741 /// }
1790 /// 1742 ///
1791 R visitLocalFunctionCompound( 1743 R errorLocalFunctionCompound(
1792 Send node, 1744 Send node,
1793 LocalFunctionElement function, 1745 LocalFunctionElement function,
1794 AssignmentOperator operator, 1746 AssignmentOperator operator,
1795 Node rhs, 1747 Node rhs,
1796 A arg); 1748 A arg);
1797 1749
1798 /// Compound assignment expression of [rhs] with [operator] on a static 1750 /// Compound assignment expression of [rhs] with [operator] on a static
1799 /// [field]. 1751 /// [field].
1800 /// 1752 ///
1801 /// For instance: 1753 /// For instance:
(...skipping 11 matching lines...) Expand all
1813 1765
1814 /// Compound assignment expression of [rhs] with [operator] on a final static 1766 /// Compound assignment expression of [rhs] with [operator] on a final static
1815 /// [field]. 1767 /// [field].
1816 /// 1768 ///
1817 /// For instance: 1769 /// For instance:
1818 /// class C { 1770 /// class C {
1819 /// static final field = 0; 1771 /// static final field = 0;
1820 /// m(rhs) => field += rhs; 1772 /// m(rhs) => field += rhs;
1821 /// } 1773 /// }
1822 /// 1774 ///
1823 R visitFinalStaticFieldCompound( 1775 R errorFinalStaticFieldCompound(
1824 Send node, 1776 Send node,
1825 FieldElement field, 1777 FieldElement field,
1826 AssignmentOperator operator, 1778 AssignmentOperator operator,
1827 Node rhs, 1779 Node rhs,
1828 A arg); 1780 A arg);
1829 1781
1830 /// Compound assignment expression of [rhs] with [operator] reading from a 1782 /// Compound assignment expression of [rhs] with [operator] reading from a
1831 /// static [getter] and writing to a static [setter]. 1783 /// static [getter] and writing to a static [setter].
1832 /// 1784 ///
1833 /// For instance: 1785 /// For instance:
(...skipping 17 matching lines...) Expand all
1851 /// 1803 ///
1852 /// For instance: 1804 /// For instance:
1853 /// class C { 1805 /// class C {
1854 /// static o() {} 1806 /// static o() {}
1855 /// static set o(_) {} 1807 /// static set o(_) {}
1856 /// m(rhs) => o += rhs; 1808 /// m(rhs) => o += rhs;
1857 /// } 1809 /// }
1858 /// 1810 ///
1859 R visitStaticMethodSetterCompound( 1811 R visitStaticMethodSetterCompound(
1860 Send node, 1812 Send node,
1861 MethodElement method, 1813 FunctionElement method,
1862 MethodElement setter, 1814 FunctionElement setter,
1863 AssignmentOperator operator, 1815 AssignmentOperator operator,
1864 Node rhs, 1816 Node rhs,
1865 A arg); 1817 A arg);
1866 1818
1867 /// Compound assignment expression of [rhs] with [operator] on a top level 1819 /// Compound assignment expression of [rhs] with [operator] on a top level
1868 /// [field]. 1820 /// [field].
1869 /// 1821 ///
1870 /// For instance: 1822 /// For instance:
1871 /// var field; 1823 /// var field;
1872 /// m(rhs) => field += rhs; 1824 /// m(rhs) => field += rhs;
1873 /// 1825 ///
1874 R visitTopLevelFieldCompound( 1826 R visitTopLevelFieldCompound(
1875 Send node, 1827 Send node,
1876 FieldElement field, 1828 FieldElement field,
1877 AssignmentOperator operator, 1829 AssignmentOperator operator,
1878 Node rhs, 1830 Node rhs,
1879 A arg); 1831 A arg);
1880 1832
1881 /// Compound assignment expression of [rhs] with [operator] on a final top 1833 /// Compound assignment expression of [rhs] with [operator] on a final top
1882 /// level [field]. 1834 /// level [field].
1883 /// 1835 ///
1884 /// For instance: 1836 /// For instance:
1885 /// final field = 0; 1837 /// final field = 0;
1886 /// m(rhs) => field += rhs; 1838 /// m(rhs) => field += rhs;
1887 /// 1839 ///
1888 R visitFinalTopLevelFieldCompound( 1840 R errorFinalTopLevelFieldCompound(
1889 Send node, 1841 Send node,
1890 FieldElement field, 1842 FieldElement field,
1891 AssignmentOperator operator, 1843 AssignmentOperator operator,
1892 Node rhs, 1844 Node rhs,
1893 A arg); 1845 A arg);
1894 1846
1895 /// Compound assignment expression of [rhs] with [operator] reading from a 1847 /// Compound assignment expression of [rhs] with [operator] reading from a
1896 /// top level [getter] and writing to a top level [setter]. 1848 /// top level [getter] and writing to a top level [setter].
1897 /// 1849 ///
1898 /// For instance: 1850 /// For instance:
(...skipping 19 matching lines...) Expand all
1918 /// m(rhs) => o += rhs; 1870 /// m(rhs) => o += rhs;
1919 /// 1871 ///
1920 R visitTopLevelMethodSetterCompound( 1872 R visitTopLevelMethodSetterCompound(
1921 Send node, 1873 Send node,
1922 FunctionElement method, 1874 FunctionElement method,
1923 FunctionElement setter, 1875 FunctionElement setter,
1924 AssignmentOperator operator, 1876 AssignmentOperator operator,
1925 Node rhs, 1877 Node rhs,
1926 A arg); 1878 A arg);
1927 1879
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
1943 /// Compound assignment expression of [rhs] with [operator] on a super 1880 /// Compound assignment expression of [rhs] with [operator] on a super
1944 /// [field]. 1881 /// [field].
1945 /// 1882 ///
1946 /// For instance: 1883 /// For instance:
1947 /// class B { 1884 /// class B {
1948 /// var field; 1885 /// var field;
1949 /// } 1886 /// }
1950 /// class C extends B { 1887 /// class C extends B {
1951 /// m(rhs) => super.field += rhs; 1888 /// m(rhs) => super.field += rhs;
1952 /// } 1889 /// }
1953 /// 1890 ///
1954 R visitSuperFieldCompound( 1891 R visitSuperFieldCompound(
1955 Send node, 1892 Send node,
1956 FieldElement field, 1893 FieldElement field,
1957 AssignmentOperator operator, 1894 AssignmentOperator operator,
1958 Node rhs, 1895 Node rhs,
1959 A arg); 1896 A arg);
1960 1897
1961 /// Compound assignment expression of [rhs] with [operator] on a final super 1898 /// Compound assignment expression of [rhs] with [operator] on a final super
1962 /// [field]. 1899 /// [field].
1963 /// 1900 ///
1964 /// For instance: 1901 /// For instance:
1965 /// class B { 1902 /// class B {
1966 /// final field = 42; 1903 /// final field = 0;
1967 /// } 1904 /// }
1968 /// class C extends B { 1905 /// class C extends B {
1969 /// m(rhs) => super.field += rhs; 1906 /// m(rhs) => super.field += rhs;
1970 /// } 1907 /// }
1971 /// 1908 ///
1972 R visitFinalSuperFieldCompound( 1909 R errorFinalSuperFieldCompound(
1973 Send node, 1910 Send node,
1974 FieldElement field, 1911 FieldElement field,
1975 AssignmentOperator operator, 1912 AssignmentOperator operator,
1976 Node rhs, 1913 Node rhs,
1977 A arg); 1914 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);
2080 1915
2081 /// Compound assignment expression of [rhs] with [operator] reading from a 1916 /// Compound assignment expression of [rhs] with [operator] reading from a
2082 /// super [getter] and writing to a super [setter]. 1917 /// super [getter] and writing to a super [setter].
2083 /// 1918 ///
2084 /// For instance: 1919 /// For instance:
2085 /// class B { 1920 /// class B {
2086 /// get o => 0; 1921 /// get o => 0;
2087 /// set o(_) {} 1922 /// set o(_) {}
2088 /// } 1923 /// }
2089 /// class C extends B { 1924 /// class C extends B {
(...skipping 22 matching lines...) Expand all
2112 /// } 1947 /// }
2113 /// 1948 ///
2114 R visitSuperMethodSetterCompound( 1949 R visitSuperMethodSetterCompound(
2115 Send node, 1950 Send node,
2116 FunctionElement method, 1951 FunctionElement method,
2117 FunctionElement setter, 1952 FunctionElement setter,
2118 AssignmentOperator operator, 1953 AssignmentOperator operator,
2119 Node rhs, 1954 Node rhs,
2120 A arg); 1955 A arg);
2121 1956
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
2178 /// Compound assignment expression of [rhs] with [operator] reading from a 1957 /// Compound assignment expression of [rhs] with [operator] reading from a
2179 /// super [field] and writing to a super [setter]. 1958 /// super [field] and writing to a super [setter].
2180 /// 1959 ///
2181 /// For instance: 1960 /// For instance:
2182 /// class A { 1961 /// class A {
2183 /// var o; 1962 /// var o;
2184 /// } 1963 /// }
2185 /// class B extends A { 1964 /// class B extends A {
2186 /// set o(_) {} 1965 /// set o(_) {}
2187 /// } 1966 /// }
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 Node rhs, 1998 Node rhs,
2220 A arg); 1999 A arg);
2221 2000
2222 /// Compound assignment expression of [rhs] with [operator] on a type literal 2001 /// Compound assignment expression of [rhs] with [operator] on a type literal
2223 /// for class [element]. 2002 /// for class [element].
2224 /// 2003 ///
2225 /// For instance: 2004 /// For instance:
2226 /// class C {} 2005 /// class C {}
2227 /// m(rhs) => C += rhs; 2006 /// m(rhs) => C += rhs;
2228 /// 2007 ///
2229 R visitClassTypeLiteralCompound( 2008 R errorClassTypeLiteralCompound(
2230 Send node, 2009 Send node,
2231 ConstantExpression constant, 2010 ConstantExpression constant,
2232 AssignmentOperator operator, 2011 AssignmentOperator operator,
2233 Node rhs, 2012 Node rhs,
2234 A arg); 2013 A arg);
2235 2014
2236 /// Compound assignment expression of [rhs] with [operator] on a type literal 2015 /// Compound assignment expression of [rhs] with [operator] on a type literal
2237 /// for typedef [element]. 2016 /// for typedef [element].
2238 /// 2017 ///
2239 /// For instance: 2018 /// For instance:
2240 /// typedef F(); 2019 /// typedef F();
2241 /// m(rhs) => F += rhs; 2020 /// m(rhs) => F += rhs;
2242 /// 2021 ///
2243 R visitTypedefTypeLiteralCompound( 2022 R errorTypedefTypeLiteralCompound(
2244 Send node, 2023 Send node,
2245 ConstantExpression constant, 2024 ConstantExpression constant,
2246 AssignmentOperator operator, 2025 AssignmentOperator operator,
2247 Node rhs, 2026 Node rhs,
2248 A arg); 2027 A arg);
2249 2028
2250 /// Compound assignment expression of [rhs] with [operator] on a type literal 2029 /// Compound assignment expression of [rhs] with [operator] on a type literal
2251 /// for type variable [element]. 2030 /// for type variable [element].
2252 /// 2031 ///
2253 /// For instance: 2032 /// For instance:
2254 /// class C<T> { 2033 /// class C<T> {
2255 /// m(rhs) => T += rhs; 2034 /// m(rhs) => T += rhs;
2256 /// } 2035 /// }
2257 /// 2036 ///
2258 R visitTypeVariableTypeLiteralCompound( 2037 R errorTypeVariableTypeLiteralCompound(
2259 Send node, 2038 Send node,
2260 TypeVariableElement element, 2039 TypeVariableElement element,
2261 AssignmentOperator operator, 2040 AssignmentOperator operator,
2262 Node rhs, 2041 Node rhs,
2263 A arg); 2042 A arg);
2264 2043
2265 /// Compound assignment expression of [rhs] with [operator] on the type 2044 /// Compound assignment expression of [rhs] with [operator] on the type
2266 /// literal for `dynamic`. 2045 /// literal for `dynamic`.
2267 /// 2046 ///
2268 /// For instance: 2047 /// For instance:
2269 /// m(rhs) => dynamic += rhs; 2048 /// m(rhs) => dynamic += rhs;
2270 /// 2049 ///
2271 R visitDynamicTypeLiteralCompound( 2050 R errorDynamicTypeLiteralCompound(
2272 Send node, 2051 Send node,
2273 ConstantExpression constant, 2052 ConstantExpression constant,
2274 AssignmentOperator operator, 2053 AssignmentOperator operator,
2275 Node rhs, 2054 Node rhs,
2276 A arg); 2055 A arg);
2277 2056
2278 /// Compound index assignment of [rhs] with [operator] to [index] on the 2057 /// Compound index assignment of [rhs] with [operator] to [index] on the
2279 /// index operators of [receiver] whose getter and setter are defined by 2058 /// index operators of [receiver] whose getter and setter are defined by
2280 /// [getterSelector] and [setterSelector], respectively. 2059 /// [getterSelector] and [setterSelector], respectively.
2281 /// 2060 ///
(...skipping 23 matching lines...) Expand all
2305 R visitSuperCompoundIndexSet( 2084 R visitSuperCompoundIndexSet(
2306 SendSet node, 2085 SendSet node,
2307 MethodElement getter, 2086 MethodElement getter,
2308 MethodElement setter, 2087 MethodElement setter,
2309 Node index, 2088 Node index,
2310 AssignmentOperator operator, 2089 AssignmentOperator operator,
2311 Node rhs, 2090 Node rhs,
2312 A arg); 2091 A arg);
2313 2092
2314 /// Compound index assignment of [rhs] with [operator] to [index] on a super 2093 /// Compound index assignment of [rhs] with [operator] to [index] on a super
2315 /// super class where the index getter is undefined and the index setter is 2094 /// super class where the index getter is undefined. The index setter might
2316 /// defined by [setter]. 2095 /// also be undefined.
2317 /// 2096 ///
2318 /// For instance 2097 /// For instance
2319 /// class B { 2098 /// class B {
2320 /// } 2099 /// }
2321 /// class C extends B { 2100 /// class C extends B {
2322 /// m() => super[1] += 42; 2101 /// m() => super[1] += 42;
2323 /// } 2102 /// }
2324 /// 2103 ///
2325 R visitUnresolvedSuperGetterCompoundIndexSet( 2104 R visitUnresolvedSuperGetterCompoundIndexSet(
2326 Send node, 2105 Send node,
2327 Element element, 2106 Element element,
2328 MethodElement setter,
2329 Node index, 2107 Node index,
2330 AssignmentOperator operator, 2108 AssignmentOperator operator,
2331 Node rhs, 2109 Node rhs,
2332 A arg); 2110 A arg);
2333 2111
2334 /// Compound index assignment of [rhs] with [operator] to [index] on a super 2112 /// Compound index assignment of [rhs] with [operator] to [index] on a super
2335 /// super class where the index getter is defined by [getter] but the index 2113 /// super class where the index getter is defined by [getter] but the index
2336 /// setter is undefined. 2114 /// setter is undefined.
2337 /// 2115 ///
2338 /// For instance 2116 /// For instance
2339 /// class B { 2117 /// class B {
2340 /// operator [](index) => 42; 2118 /// operator [](index) => 42;
2341 /// } 2119 /// }
2342 /// class C extends B { 2120 /// class C extends B {
2343 /// m() => super[1] += 42; 2121 /// m() => super[1] += 42;
2344 /// } 2122 /// }
2345 /// 2123 ///
2346 R visitUnresolvedSuperSetterCompoundIndexSet( 2124 R visitUnresolvedSuperSetterCompoundIndexSet(
2347 Send node, 2125 Send node,
2348 MethodElement getter, 2126 MethodElement getter,
2349 Element element, 2127 Element element,
2350 Node index, 2128 Node index,
2351 AssignmentOperator operator, 2129 AssignmentOperator operator,
2352 Node rhs, 2130 Node rhs,
2353 A arg); 2131 A arg);
2354 2132
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
2373 /// Prefix expression with [operator] of the property on [receiver] whose 2133 /// Prefix expression with [operator] of the property on [receiver] whose
2374 /// getter and setter are defined by [getterSelector] and [setterSelector], 2134 /// getter and setter are defined by [getterSelector] and [setterSelector],
2375 /// respectively. 2135 /// respectively.
2376 /// 2136 ///
2377 /// For instance: 2137 /// For instance:
2378 /// m(receiver) => ++receiver.foo; 2138 /// m(receiver) => ++receiver.foo;
2379 /// 2139 ///
2380 R visitDynamicPropertyPrefix( 2140 R visitDynamicPropertyPrefix(
2381 Send node, 2141 Send node,
2382 Node receiver, 2142 Node receiver,
2383 IncDecOperator operator, 2143 IncDecOperator operator,
2384 Selector getterSelector, 2144 Selector getterSelector,
2385 Selector setterSelector, 2145 Selector setterSelector,
2386 A arg); 2146 A arg);
2387 2147
2388 /// Prefix expression with [operator] on a [parameter]. 2148 /// Prefix expression with [operator] on a [parameter].
2389 /// 2149 ///
2390 /// For instance: 2150 /// For instance:
2391 /// m(parameter) => ++parameter; 2151 /// m(parameter) => ++parameter;
2392 /// 2152 ///
2393 R visitParameterPrefix( 2153 R visitParameterPrefix(
2394 Send node, 2154 Send node,
2395 ParameterElement parameter, 2155 ParameterElement parameter,
2396 IncDecOperator operator, 2156 IncDecOperator operator,
2397 A arg); 2157 A arg);
2398 2158
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
2410 /// Prefix expression with [operator] on a local [variable]. 2159 /// Prefix expression with [operator] on a local [variable].
2411 /// 2160 ///
2412 /// For instance: 2161 /// For instance:
2413 /// m() { 2162 /// m() {
2414 /// var variable; 2163 /// var variable;
2415 /// ++variable; 2164 /// ++variable;
2416 /// } 2165 /// }
2417 /// 2166 ///
2418 R visitLocalVariablePrefix( 2167 R visitLocalVariablePrefix(
2419 Send node, 2168 Send node,
2420 LocalVariableElement variable, 2169 LocalVariableElement variable,
2421 IncDecOperator operator, 2170 IncDecOperator operator,
2422 A arg); 2171 A arg);
2423 2172
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
2438 /// Prefix expression with [operator] on a local [function]. 2173 /// Prefix expression with [operator] on a local [function].
2439 /// 2174 ///
2440 /// For instance: 2175 /// For instance:
2441 /// m() { 2176 /// m() {
2442 /// function() {} 2177 /// function() {}
2443 /// ++function; 2178 /// ++function;
2444 /// } 2179 /// }
2445 /// 2180 ///
2446 R visitLocalFunctionPrefix( 2181 R errorLocalFunctionPrefix(
2447 Send node, 2182 Send node,
2448 LocalFunctionElement function, 2183 LocalFunctionElement function,
2449 IncDecOperator operator, 2184 IncDecOperator operator,
2450 A arg); 2185 A arg);
2451 2186
2452 2187
2453 /// Prefix expression with [operator] of the property on `this` whose getter 2188 /// Prefix expression with [operator] of the property on `this` whose getter
2454 /// and setter are defined by [getterSelector] and [setterSelector], 2189 /// and setter are defined by [getterSelector] and [setterSelector],
2455 /// respectively. 2190 /// respectively.
2456 /// 2191 ///
(...skipping 20 matching lines...) Expand all
2477 /// static var field; 2212 /// static var field;
2478 /// m() => ++field; 2213 /// m() => ++field;
2479 /// } 2214 /// }
2480 /// 2215 ///
2481 R visitStaticFieldPrefix( 2216 R visitStaticFieldPrefix(
2482 Send node, 2217 Send node,
2483 FieldElement field, 2218 FieldElement field,
2484 IncDecOperator operator, 2219 IncDecOperator operator,
2485 A arg); 2220 A arg);
2486 2221
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
2501 /// Prefix expression with [operator] reading from a static [getter] and 2222 /// Prefix expression with [operator] reading from a static [getter] and
2502 /// writing to a static [setter]. 2223 /// writing to a static [setter].
2503 /// 2224 ///
2504 /// For instance: 2225 /// For instance:
2505 /// class C { 2226 /// class C {
2506 /// static get o => 0; 2227 /// static get o => 0;
2507 /// static set o(_) {} 2228 /// static set o(_) {}
2508 /// m() => ++o; 2229 /// m() => ++o;
2509 /// } 2230 /// }
2510 /// 2231 ///
(...skipping 27 matching lines...) Expand all
2538 /// For instance: 2259 /// For instance:
2539 /// var field; 2260 /// var field;
2540 /// m() => ++field; 2261 /// m() => ++field;
2541 /// 2262 ///
2542 R visitTopLevelFieldPrefix( 2263 R visitTopLevelFieldPrefix(
2543 Send node, 2264 Send node,
2544 FieldElement field, 2265 FieldElement field,
2545 IncDecOperator operator, 2266 IncDecOperator operator,
2546 A arg); 2267 A arg);
2547 2268
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
2560 /// Prefix expression with [operator] reading from a top level [getter] and 2269 /// Prefix expression with [operator] reading from a top level [getter] and
2561 /// writing to a top level [setter]. 2270 /// writing to a top level [setter].
2562 /// 2271 ///
2563 /// For instance: 2272 /// For instance:
2564 /// get o => 0; 2273 /// get o => 0;
2565 /// set o(_) {} 2274 /// set o(_) {}
2566 /// m() => ++o; 2275 /// m() => ++o;
2567 /// 2276 ///
2568 R visitTopLevelGetterSetterPrefix( 2277 R visitTopLevelGetterSetterPrefix(
2569 Send node, 2278 Send node,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
2698 /// m() => ++super.o; 2407 /// m() => ++super.o;
2699 /// } 2408 /// }
2700 /// 2409 ///
2701 R visitSuperMethodSetterPrefix( 2410 R visitSuperMethodSetterPrefix(
2702 Send node, 2411 Send node,
2703 FunctionElement method, 2412 FunctionElement method,
2704 FunctionElement setter, 2413 FunctionElement setter,
2705 IncDecOperator operator, 2414 IncDecOperator operator,
2706 A arg); 2415 A arg);
2707 2416
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
2764 /// Prefix expression with [operator] on a type literal for a class [element]. 2417 /// Prefix expression with [operator] on a type literal for a class [element].
2765 /// 2418 ///
2766 /// For instance: 2419 /// For instance:
2767 /// class C {} 2420 /// class C {}
2768 /// m() => ++C; 2421 /// m() => ++C;
2769 /// 2422 ///
2770 R visitClassTypeLiteralPrefix( 2423 R errorClassTypeLiteralPrefix(
2771 Send node, 2424 Send node,
2772 ConstantExpression constant, 2425 ConstantExpression constant,
2773 IncDecOperator operator, 2426 IncDecOperator operator,
2774 A arg); 2427 A arg);
2775 2428
2776 /// Prefix expression with [operator] on a type literal for a typedef 2429 /// Prefix expression with [operator] on a type literal for a typedef
2777 /// [element]. 2430 /// [element].
2778 /// 2431 ///
2779 /// For instance: 2432 /// For instance:
2780 /// typedef F(); 2433 /// typedef F();
2781 /// m() => ++F; 2434 /// m() => ++F;
2782 /// 2435 ///
2783 R visitTypedefTypeLiteralPrefix( 2436 R errorTypedefTypeLiteralPrefix(
2784 Send node, 2437 Send node,
2785 ConstantExpression constant, 2438 ConstantExpression constant,
2786 IncDecOperator operator, 2439 IncDecOperator operator,
2787 A arg); 2440 A arg);
2788 2441
2789 /// Prefix expression with [operator] on a type literal for a type variable 2442 /// Prefix expression with [operator] on a type literal for a type variable
2790 /// [element]. 2443 /// [element].
2791 /// 2444 ///
2792 /// For instance: 2445 /// For instance:
2793 /// class C<T> { 2446 /// class C<T> {
2794 /// m() => ++T; 2447 /// m() => ++T;
2795 /// } 2448 /// }
2796 /// 2449 ///
2797 R visitTypeVariableTypeLiteralPrefix( 2450 R errorTypeVariableTypeLiteralPrefix(
2798 Send node, 2451 Send node,
2799 TypeVariableElement element, 2452 TypeVariableElement element,
2800 IncDecOperator operator, 2453 IncDecOperator operator,
2801 A arg); 2454 A arg);
2802 2455
2803 /// Prefix expression with [operator] on the type literal for `dynamic`. 2456 /// Prefix expression with [operator] on the type literal for `dynamic`.
2804 /// 2457 ///
2805 /// For instance: 2458 /// For instance:
2806 /// m() => ++dynamic; 2459 /// m() => ++dynamic;
2807 /// 2460 ///
2808 R visitDynamicTypeLiteralPrefix( 2461 R errorDynamicTypeLiteralPrefix(
2809 Send node, 2462 Send node,
2810 ConstantExpression constant, 2463 ConstantExpression constant,
2811 IncDecOperator operator, 2464 IncDecOperator operator,
2812 A arg); 2465 A arg);
2813 2466
2814 /// Postfix expression with [operator] of the property on [receiver] whose 2467 /// Postfix expression with [operator] of the property on [receiver] whose
2815 /// getter and setter are defined by [getterSelector] and [setterSelector], 2468 /// getter and setter are defined by [getterSelector] and [setterSelector],
2816 /// respectively. 2469 /// respectively.
2817 /// 2470 ///
2818 /// For instance: 2471 /// For instance:
(...skipping 11 matching lines...) Expand all
2830 /// 2483 ///
2831 /// For instance: 2484 /// For instance:
2832 /// m(parameter) => parameter++; 2485 /// m(parameter) => parameter++;
2833 /// 2486 ///
2834 R visitParameterPostfix( 2487 R visitParameterPostfix(
2835 Send node, 2488 Send node,
2836 ParameterElement parameter, 2489 ParameterElement parameter,
2837 IncDecOperator operator, 2490 IncDecOperator operator,
2838 A arg); 2491 A arg);
2839 2492
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
2851 /// Postfix expression with [operator] on a local [variable]. 2493 /// Postfix expression with [operator] on a local [variable].
2852 /// 2494 ///
2853 /// For instance: 2495 /// For instance:
2854 /// m() { 2496 /// m() {
2855 /// var variable; 2497 /// var variable;
2856 /// variable++; 2498 /// variable++;
2857 /// } 2499 /// }
2858 /// 2500 ///
2859 R visitLocalVariablePostfix( 2501 R visitLocalVariablePostfix(
2860 Send node, 2502 Send node,
2861 LocalVariableElement variable, 2503 LocalVariableElement variable,
2862 IncDecOperator operator, 2504 IncDecOperator operator,
2863 A arg); 2505 A arg);
2864 2506
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
2879 /// Postfix expression with [operator] on a local [function]. 2507 /// Postfix expression with [operator] on a local [function].
2880 /// 2508 ///
2881 /// For instance: 2509 /// For instance:
2882 /// m() { 2510 /// m() {
2883 /// function() {} 2511 /// function() {}
2884 /// function++; 2512 /// function++;
2885 /// } 2513 /// }
2886 /// 2514 ///
2887 R visitLocalFunctionPostfix( 2515 R errorLocalFunctionPostfix(
2888 Send node, 2516 Send node,
2889 LocalFunctionElement function, 2517 LocalFunctionElement function,
2890 IncDecOperator operator, 2518 IncDecOperator operator,
2891 A arg); 2519 A arg);
2892 2520
2893 2521
2894 /// Postfix expression with [operator] of the property on `this` whose getter 2522 /// Postfix expression with [operator] of the property on `this` whose getter
2895 /// and setter are defined by [getterSelector] and [setterSelector], 2523 /// and setter are defined by [getterSelector] and [setterSelector],
2896 /// respectively. 2524 /// respectively.
2897 /// 2525 ///
(...skipping 20 matching lines...) Expand all
2918 /// static var field; 2546 /// static var field;
2919 /// m() => field++; 2547 /// m() => field++;
2920 /// } 2548 /// }
2921 /// 2549 ///
2922 R visitStaticFieldPostfix( 2550 R visitStaticFieldPostfix(
2923 Send node, 2551 Send node,
2924 FieldElement field, 2552 FieldElement field,
2925 IncDecOperator operator, 2553 IncDecOperator operator,
2926 A arg); 2554 A arg);
2927 2555
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
2942 /// Postfix expression with [operator] reading from a static [getter] and 2556 /// Postfix expression with [operator] reading from a static [getter] and
2943 /// writing to a static [setter]. 2557 /// writing to a static [setter].
2944 /// 2558 ///
2945 /// For instance: 2559 /// For instance:
2946 /// class C { 2560 /// class C {
2947 /// static get o => 0; 2561 /// static get o => 0;
2948 /// static set o(_) {} 2562 /// static set o(_) {}
2949 /// m() => o++; 2563 /// m() => o++;
2950 /// } 2564 /// }
2951 /// 2565 ///
(...skipping 27 matching lines...) Expand all
2979 /// For instance: 2593 /// For instance:
2980 /// var field; 2594 /// var field;
2981 /// m() => field++; 2595 /// m() => field++;
2982 /// 2596 ///
2983 R visitTopLevelFieldPostfix( 2597 R visitTopLevelFieldPostfix(
2984 Send node, 2598 Send node,
2985 FieldElement field, 2599 FieldElement field,
2986 IncDecOperator operator, 2600 IncDecOperator operator,
2987 A arg); 2601 A arg);
2988 2602
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
3001 /// Postfix expression with [operator] reading from a top level [getter] and 2603 /// Postfix expression with [operator] reading from a top level [getter] and
3002 /// writing to a top level [setter]. 2604 /// writing to a top level [setter].
3003 /// 2605 ///
3004 /// For instance: 2606 /// For instance:
3005 /// get o => 0; 2607 /// get o => 0;
3006 /// set o(_) {} 2608 /// set o(_) {}
3007 /// m() => o++; 2609 /// m() => o++;
3008 /// 2610 ///
3009 R visitTopLevelGetterSetterPostfix( 2611 R visitTopLevelGetterSetterPostfix(
3010 Send node, 2612 Send node,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
3139 /// m() => super.o++; 2741 /// m() => super.o++;
3140 /// } 2742 /// }
3141 /// 2743 ///
3142 R visitSuperMethodSetterPostfix( 2744 R visitSuperMethodSetterPostfix(
3143 Send node, 2745 Send node,
3144 FunctionElement method, 2746 FunctionElement method,
3145 FunctionElement setter, 2747 FunctionElement setter,
3146 IncDecOperator operator, 2748 IncDecOperator operator,
3147 A arg); 2749 A arg);
3148 2750
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
3205 /// Postfix expression with [operator] on a type literal for a class 2751 /// Postfix expression with [operator] on a type literal for a class
3206 /// [element]. 2752 /// [element].
3207 /// 2753 ///
3208 /// For instance: 2754 /// For instance:
3209 /// class C {} 2755 /// class C {}
3210 /// m() => C++; 2756 /// m() => C++;
3211 /// 2757 ///
3212 R visitClassTypeLiteralPostfix( 2758 R errorClassTypeLiteralPostfix(
3213 Send node, 2759 Send node,
3214 ConstantExpression constant, 2760 ConstantExpression constant,
3215 IncDecOperator operator, 2761 IncDecOperator operator,
3216 A arg); 2762 A arg);
3217 2763
3218 /// Postfix expression with [operator] on a type literal for a typedef 2764 /// Postfix expression with [operator] on a type literal for a typedef
3219 /// [element]. 2765 /// [element].
3220 /// 2766 ///
3221 /// For instance: 2767 /// For instance:
3222 /// typedef F(); 2768 /// typedef F();
3223 /// m() => F++; 2769 /// m() => F++;
3224 /// 2770 ///
3225 R visitTypedefTypeLiteralPostfix( 2771 R errorTypedefTypeLiteralPostfix(
3226 Send node, 2772 Send node,
3227 ConstantExpression constant, 2773 ConstantExpression constant,
3228 IncDecOperator operator, 2774 IncDecOperator operator,
3229 A arg); 2775 A arg);
3230 2776
3231 /// Postfix expression with [operator] on a type literal for a type variable 2777 /// Postfix expression with [operator] on a type literal for a type variable
3232 /// [element]. 2778 /// [element].
3233 /// 2779 ///
3234 /// For instance: 2780 /// For instance:
3235 /// class C<T> { 2781 /// class C<T> {
3236 /// m() => T++; 2782 /// m() => T++;
3237 /// } 2783 /// }
3238 /// 2784 ///
3239 R visitTypeVariableTypeLiteralPostfix( 2785 R errorTypeVariableTypeLiteralPostfix(
3240 Send node, 2786 Send node,
3241 TypeVariableElement element, 2787 TypeVariableElement element,
3242 IncDecOperator operator, 2788 IncDecOperator operator,
3243 A arg); 2789 A arg);
3244 2790
3245 /// Postfix expression with [operator] on the type literal for `dynamic`. 2791 /// Postfix expression with [operator] on the type literal for `dynamic`.
3246 /// 2792 ///
3247 /// For instance: 2793 /// For instance:
3248 /// m() => dynamic++; 2794 /// m() => dynamic++;
3249 /// 2795 ///
3250 R visitDynamicTypeLiteralPostfix( 2796 R errorDynamicTypeLiteralPostfix(
3251 Send node, 2797 Send node,
3252 ConstantExpression constant, 2798 ConstantExpression constant,
3253 IncDecOperator operator, 2799 IncDecOperator operator,
3254 A arg); 2800 A arg);
3255 2801
3256 /// Read of the [constant]. 2802 /// Read of the [constant].
3257 /// 2803 ///
3258 /// For instance 2804 /// For instance
3259 /// const c = c; 2805 /// const c = c;
3260 /// m() => c; 2806 /// m() => c;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
3355 /// m() => super.foo(); 2901 /// m() => super.foo();
3356 /// } 2902 /// }
3357 /// 2903 ///
3358 R visitUnresolvedSuperInvoke( 2904 R visitUnresolvedSuperInvoke(
3359 Send node, 2905 Send node,
3360 Element element, 2906 Element element,
3361 NodeList arguments, 2907 NodeList arguments,
3362 Selector selector, 2908 Selector selector,
3363 A arg); 2909 A arg);
3364 2910
3365 /// Compound assignment of [rhs] with [operator] reading from the 2911 /// Compound assignment of [rhs] on the unresolved [element].
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.
3446 /// 2912 ///
3447 /// For instance 2913 /// For instance
3448 /// class C {} 2914 /// class C {}
3449 /// m1() => unresolved += 42; 2915 /// m1() => unresolved += 42;
3450 /// m2() => prefix.unresolved += 42; 2916 /// m2() => prefix.unresolved += 42;
3451 /// m3() => Unresolved.foo += 42; 2917 /// m3() => Unresolved.foo += 42;
3452 /// m4() => unresolved.foo += 42; 2918 /// m4() => unresolved.foo += 42;
3453 /// m5() => unresolved.Foo.bar += 42; 2919 /// m5() => unresolved.Foo.bar += 42;
3454 /// m6() => C.unresolved += 42; 2920 /// m6() => C.unresolved += 42;
3455 /// m7() => prefix.C.unresolved += 42; 2921 /// m7() => prefix.C.unresolved += 42;
3456 /// 2922 ///
3457 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2923 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
3458 R visitUnresolvedCompound( 2924 R errorUnresolvedCompound(
3459 Send node, 2925 Send node,
3460 Element element, 2926 Element element,
3461 AssignmentOperator operator, 2927 AssignmentOperator operator,
3462 Node rhs, 2928 Node rhs,
3463 A arg); 2929 A arg);
3464 2930
3465 /// Prefix operation of [operator] reading from the non-existing static getter 2931 /// Prefix operation on the unresolved [element].
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.
3556 /// 2932 ///
3557 /// For instance 2933 /// For instance
3558 /// class C {} 2934 /// class C {}
3559 /// m1() => ++unresolved; 2935 /// m1() => ++unresolved;
3560 /// m2() => ++prefix.unresolved; 2936 /// m2() => ++prefix.unresolved;
3561 /// m3() => ++Unresolved.foo; 2937 /// m3() => ++Unresolved.foo;
3562 /// m4() => ++unresolved.foo; 2938 /// m4() => ++unresolved.foo;
3563 /// m5() => ++unresolved.Foo.bar; 2939 /// m5() => ++unresolved.Foo.bar;
3564 /// m6() => ++C.unresolved; 2940 /// m6() => ++C.unresolved;
3565 /// m7() => ++prefix.C.unresolved; 2941 /// m7() => ++prefix.C.unresolved;
3566 /// 2942 ///
3567 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2943 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
3568 R visitUnresolvedPrefix( 2944 R errorUnresolvedPrefix(
3569 Send node, 2945 Send node,
3570 Element element, 2946 Element element,
3571 IncDecOperator operator, 2947 IncDecOperator operator,
3572 A arg); 2948 A arg);
3573 2949
3574 /// Postfix operation of [operator] reading from the non-existing static 2950 /// Postfix operation on the unresolved [element].
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.
3665 /// 2951 ///
3666 /// For instance 2952 /// For instance
3667 /// class C {} 2953 /// class C {}
3668 /// m1() => unresolved++; 2954 /// m1() => unresolved++;
3669 /// m2() => prefix.unresolved++; 2955 /// m2() => prefix.unresolved++;
3670 /// m3() => Unresolved.foo++; 2956 /// m3() => Unresolved.foo++;
3671 /// m4() => unresolved.foo++; 2957 /// m4() => unresolved.foo++;
3672 /// m5() => unresolved.Foo.bar++; 2958 /// m5() => unresolved.Foo.bar++;
3673 /// m6() => C.unresolved++; 2959 /// m6() => C.unresolved++;
3674 /// m7() => prefix.C.unresolved++; 2960 /// m7() => prefix.C.unresolved++;
3675 /// 2961 ///
3676 // TODO(johnniwinther): Split the cases in which a prefix is resolved. 2962 // TODO(johnniwinther): Split the cases in which a prefix is resolved.
3677 R visitUnresolvedPostfix( 2963 R errorUnresolvedPostfix(
3678 Send node, 2964 Send node,
3679 Element element, 2965 Element element,
3680 IncDecOperator operator, 2966 IncDecOperator operator,
3681 A arg); 2967 A arg);
3682 2968
3683 /// Invocation of an undefined unary [operator] on [expression]. 2969 /// Invocation of an undefined unary [operator] on [expression].
3684 R errorUndefinedUnaryExpression( 2970 R errorUndefinedUnaryExpression(
3685 Send node, 2971 Send node,
3686 Operator operator, 2972 Operator operator,
3687 Node expression, 2973 Node expression,
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
4421 /// C() : this._(42); 3707 /// C() : this._(42);
4422 /// } 3708 /// }
4423 /// 3709 ///
4424 R errorUnresolvedThisConstructorInvoke( 3710 R errorUnresolvedThisConstructorInvoke(
4425 Send node, 3711 Send node,
4426 Element element, 3712 Element element,
4427 NodeList arguments, 3713 NodeList arguments,
4428 Selector selector, 3714 Selector selector,
4429 A arg); 3715 A arg);
4430 } 3716 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/access_semantics.dart ('k') | pkg/compiler/lib/src/resolution/semantic_visitor_mixins.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698