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

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

Issue 1146973002: Rename remaining runtime-error methods from errorX to visitX. (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 part of dart2js.semantics_visitor; 5 part of dart2js.semantics_visitor;
6 6
7 /// Interface for bulk handling of a [Node] in a semantic visitor. 7 /// Interface for bulk handling of a [Node] in a semantic visitor.
8 abstract class BulkHandle<R, A> { 8 abstract class BulkHandle<R, A> {
9 /// Handle [node] either regardless of semantics or to report that [node] is 9 /// Handle [node] either regardless of semantics or to report that [node] is
10 /// unhandled. [message] contains a message template for the latter case: 10 /// unhandled. [message] contains a message template for the latter case:
(...skipping 15 matching lines...) Expand all
26 26
27 @override 27 @override
28 R errorInvalidAssert( 28 R errorInvalidAssert(
29 Send node, 29 Send node,
30 NodeList arguments, 30 NodeList arguments,
31 A arg) { 31 A arg) {
32 return bulkHandleError(node, arg); 32 return bulkHandleError(node, arg);
33 } 33 }
34 34
35 @override 35 @override
36 R errorClassTypeLiteralSet(
37 SendSet node,
38 ConstantExpression constant,
39 Node rhs,
40 A arg) {
41 return bulkHandleError(node, arg);
42 }
43
44 @override
45 R errorDynamicTypeLiteralSet(
46 SendSet node,
47 ConstantExpression constant,
48 Node rhs,
49 A arg) {
50 return bulkHandleError(node, arg);
51 }
52
53 @override
54 R errorFinalLocalVariableSet(
55 SendSet node,
56 LocalVariableElement variable,
57 Node rhs,
58 A arg) {
59 return bulkHandleError(node, arg);
60 }
61
62 @override
63 R errorFinalParameterSet(
64 SendSet node,
65 ParameterElement parameter,
66 Node rhs,
67 A arg) {
68 return bulkHandleError(node, arg);
69 }
70
71 @override
72 R errorFinalStaticFieldSet(
73 SendSet node,
74 FieldElement field,
75 Node rhs,
76 A arg) {
77 return bulkHandleError(node, arg);
78 }
79
80 @override
81 R errorFinalSuperFieldSet(
82 SendSet node,
83 FieldElement field,
84 Node rhs,
85 A arg) {
86 return bulkHandleError(node, arg);
87 }
88
89 @override
90 R errorFinalTopLevelFieldSet(
91 SendSet node,
92 FieldElement field,
93 Node rhs,
94 A arg) {
95 return bulkHandleError(node, arg);
96 }
97
98 @override
99 R errorLocalFunctionSet(
100 SendSet node,
101 LocalFunctionElement function,
102 Node rhs,
103 A arg) {
104 return bulkHandleError(node, arg);
105 }
106
107 @override
108 R errorNonConstantConstructorInvoke( 36 R errorNonConstantConstructorInvoke(
109 NewExpression node, 37 NewExpression node,
110 Element element, 38 Element element,
111 DartType type, 39 DartType type,
112 NodeList arguments, 40 NodeList arguments,
113 CallStructure callStructure, 41 CallStructure callStructure,
114 A arg) { 42 A arg) {
115 return bulkHandleError(node, arg); 43 return bulkHandleError(node, arg);
116 } 44 }
117 45
118 @override 46 @override
119 R errorStaticFunctionSet(
120 Send node,
121 MethodElement function,
122 Node rhs,
123 A arg) {
124 return bulkHandleError(node, arg);
125 }
126
127 @override
128 R errorStaticGetterSet(
129 SendSet node,
130 FunctionElement getter,
131 Node rhs,
132 A arg) {
133 return bulkHandleError(node, arg);
134 }
135
136 @override
137 R errorStaticSetterGet(
138 Send node,
139 FunctionElement setter,
140 A arg) {
141 return bulkHandleError(node, arg);
142 }
143
144 @override
145 R errorStaticSetterInvoke(
146 Send node,
147 FunctionElement setter,
148 NodeList arguments,
149 CallStructure callStructure,
150 A arg) {
151 return bulkHandleError(node, arg);
152 }
153
154 @override
155 R errorSuperGetterSet(
156 SendSet node,
157 FunctionElement getter,
158 Node rhs,
159 A arg) {
160 return bulkHandleError(node, arg);
161 }
162
163 @override
164 R errorSuperMethodSet(
165 Send node,
166 MethodElement method,
167 Node rhs,
168 A arg) {
169 return bulkHandleError(node, arg);
170 }
171
172 @override
173 R errorSuperSetterGet(
174 Send node,
175 FunctionElement setter,
176 A arg) {
177 return bulkHandleError(node, arg);
178 }
179
180 @override
181 R errorSuperSetterInvoke(
182 Send node,
183 FunctionElement setter,
184 NodeList arguments,
185 CallStructure callStructure,
186 A arg) {
187 return bulkHandleError(node, arg);
188 }
189
190 @override
191 R errorTopLevelFunctionSet(
192 Send node,
193 MethodElement function,
194 Node rhs,
195 A arg) {
196 return bulkHandleError(node, arg);
197 }
198
199 @override
200 R errorTopLevelGetterSet(
201 SendSet node,
202 FunctionElement getter,
203 Node rhs,
204 A arg) {
205 return bulkHandleError(node, arg);
206 }
207
208 @override
209 R errorTopLevelSetterGet(
210 Send node,
211 FunctionElement setter,
212 A arg) {
213 return bulkHandleError(node, arg);
214 }
215
216 @override
217 R errorTopLevelSetterInvoke(
218 Send node,
219 FunctionElement setter,
220 NodeList arguments,
221 CallStructure callStructure,
222 A arg) {
223 return bulkHandleError(node, arg);
224 }
225
226 @override
227 R errorTypeVariableTypeLiteralSet(
228 SendSet node,
229 TypeVariableElement element,
230 Node rhs,
231 A arg) {
232 return bulkHandleError(node, arg);
233 }
234
235 @override
236 R errorTypedefTypeLiteralSet(
237 SendSet node,
238 ConstantExpression constant,
239 Node rhs,
240 A arg) {
241 return bulkHandleError(node, arg);
242 }
243
244 @override
245 R errorUnresolvedSet(
246 Send node,
247 Element element,
248 Node rhs,
249 A arg) {
250 return bulkHandleError(node, arg);
251 }
252
253 @override
254 R errorUndefinedUnaryExpression( 47 R errorUndefinedUnaryExpression(
255 Send node, 48 Send node,
256 Operator operator, 49 Operator operator,
257 Node expression, 50 Node expression,
258 A arg) { 51 A arg) {
259 return bulkHandleError(node, arg); 52 return bulkHandleError(node, arg);
260 } 53 }
261 54
262 @override 55 @override
263 R errorUndefinedBinaryExpression( 56 R errorUndefinedBinaryExpression(
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 1566
1774 @override 1567 @override
1775 R visitUnresolvedSuperInvoke( 1568 R visitUnresolvedSuperInvoke(
1776 Send node, 1569 Send node,
1777 Element function, 1570 Element function,
1778 NodeList arguments, 1571 NodeList arguments,
1779 Selector selector, 1572 Selector selector,
1780 A arg) { 1573 A arg) {
1781 return bulkHandleInvoke(node, arg); 1574 return bulkHandleInvoke(node, arg);
1782 } 1575 }
1576
1577 @override
1578 R visitStaticSetterInvoke(
1579 Send node,
1580 FunctionElement setter,
1581 NodeList arguments,
1582 CallStructure callStructure,
1583 A arg) {
1584 return bulkHandleInvoke(node, arg);
1585 }
1586
1587 @override
1588 R visitSuperSetterInvoke(
1589 Send node,
1590 FunctionElement setter,
1591 NodeList arguments,
1592 CallStructure callStructure,
1593 A arg) {
1594 return bulkHandleInvoke(node, arg);
1595 }
1596
1597 @override
1598 R visitTopLevelSetterInvoke(
1599 Send node,
1600 FunctionElement setter,
1601 NodeList arguments,
1602 CallStructure callStructure,
1603 A arg) {
1604 return bulkHandleInvoke(node, arg);
1605 }
1783 } 1606 }
1784 1607
1785 /// Mixin that implements all `visitXGet` methods of [SemanticSendVisitor] by 1608 /// Mixin that implements all `visitXGet` methods of [SemanticSendVisitor] by
1786 /// delegating to a bulk handler. 1609 /// delegating to a bulk handler.
1787 /// 1610 ///
1788 /// Use this mixin to provide a trivial implementation for all `visitXGet` 1611 /// Use this mixin to provide a trivial implementation for all `visitXGet`
1789 /// methods. 1612 /// methods.
1790 abstract class GetBulkMixin<R, A> 1613 abstract class GetBulkMixin<R, A>
1791 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { 1614 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
1792 1615
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
1960 return bulkHandleGet(node, arg); 1783 return bulkHandleGet(node, arg);
1961 } 1784 }
1962 1785
1963 @override 1786 @override
1964 R visitUnresolvedSuperGet( 1787 R visitUnresolvedSuperGet(
1965 Send node, 1788 Send node,
1966 Element element, 1789 Element element,
1967 A arg) { 1790 A arg) {
1968 return bulkHandleGet(node, arg); 1791 return bulkHandleGet(node, arg);
1969 } 1792 }
1793
1794 @override
1795 R visitStaticSetterGet(
1796 Send node,
1797 FunctionElement setter,
1798 A arg) {
1799 return bulkHandleGet(node, arg);
1800 }
1801
1802 @override
1803 R visitSuperSetterGet(
1804 Send node,
1805 FunctionElement setter,
1806 A arg) {
1807 return bulkHandleGet(node, arg);
1808 }
1809
1810 @override
1811 R visitTopLevelSetterGet(
1812 Send node,
1813 FunctionElement setter,
1814 A arg) {
1815 return bulkHandleGet(node, arg);
1816 }
1970 } 1817 }
1971 1818
1972 /// Mixin that implements all `visitXSet` methods of [SemanticSendVisitor] by 1819 /// Mixin that implements all `visitXSet` methods of [SemanticSendVisitor] by
1973 /// delegating to a bulk handler. 1820 /// delegating to a bulk handler.
1974 /// 1821 ///
1975 /// Use this mixin to provide a trivial implementation for all `visitXSet` 1822 /// Use this mixin to provide a trivial implementation for all `visitXSet`
1976 /// methods. 1823 /// methods.
1977 abstract class SetBulkMixin<R, A> 1824 abstract class SetBulkMixin<R, A>
1978 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { 1825 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
1979 1826
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
2064 } 1911 }
2065 1912
2066 @override 1913 @override
2067 R visitTopLevelSetterSet( 1914 R visitTopLevelSetterSet(
2068 SendSet node, 1915 SendSet node,
2069 FunctionElement setter, 1916 FunctionElement setter,
2070 Node rhs, 1917 Node rhs,
2071 A arg) { 1918 A arg) {
2072 return bulkHandleSet(node, arg); 1919 return bulkHandleSet(node, arg);
2073 } 1920 }
1921
1922 @override
1923 R visitClassTypeLiteralSet(
1924 SendSet node,
1925 ConstantExpression constant,
1926 Node rhs,
1927 A arg) {
1928 return bulkHandleSet(node, arg);
1929 }
1930
1931 @override
1932 R visitDynamicTypeLiteralSet(
1933 SendSet node,
1934 ConstantExpression constant,
1935 Node rhs,
1936 A arg) {
1937 return bulkHandleSet(node, arg);
1938 }
1939
1940 @override
1941 R visitFinalLocalVariableSet(
1942 SendSet node,
1943 LocalVariableElement variable,
1944 Node rhs,
1945 A arg) {
1946 return bulkHandleSet(node, arg);
1947 }
1948
1949 @override
1950 R visitFinalParameterSet(
1951 SendSet node,
1952 ParameterElement parameter,
1953 Node rhs,
1954 A arg) {
1955 return bulkHandleSet(node, arg);
1956 }
1957
1958 @override
1959 R visitFinalStaticFieldSet(
1960 SendSet node,
1961 FieldElement field,
1962 Node rhs,
1963 A arg) {
1964 return bulkHandleSet(node, arg);
1965 }
1966
1967 @override
1968 R visitFinalSuperFieldSet(
1969 SendSet node,
1970 FieldElement field,
1971 Node rhs,
1972 A arg) {
1973 return bulkHandleSet(node, arg);
1974 }
1975
1976 @override
1977 R visitFinalTopLevelFieldSet(
1978 SendSet node,
1979 FieldElement field,
1980 Node rhs,
1981 A arg) {
1982 return bulkHandleSet(node, arg);
1983 }
1984
1985 @override
1986 R visitLocalFunctionSet(
1987 SendSet node,
1988 LocalFunctionElement function,
1989 Node rhs,
1990 A arg) {
1991 return bulkHandleSet(node, arg);
1992 }
1993
1994 @override
1995 R visitStaticFunctionSet(
1996 Send node,
1997 MethodElement function,
1998 Node rhs,
1999 A arg) {
2000 return bulkHandleSet(node, arg);
2001 }
2002
2003 @override
2004 R visitStaticGetterSet(
2005 SendSet node,
2006 FunctionElement getter,
2007 Node rhs,
2008 A arg) {
2009 return bulkHandleSet(node, arg);
2010 }
2011
2012 @override
2013 R visitSuperGetterSet(
2014 SendSet node,
2015 FunctionElement getter,
2016 Node rhs,
2017 A arg) {
2018 return bulkHandleSet(node, arg);
2019 }
2020
2021 @override
2022 R visitSuperMethodSet(
2023 Send node,
2024 MethodElement method,
2025 Node rhs,
2026 A arg) {
2027 return bulkHandleSet(node, arg);
2028 }
2029
2030 @override
2031 R visitTopLevelFunctionSet(
2032 Send node,
2033 MethodElement function,
2034 Node rhs,
2035 A arg) {
2036 return bulkHandleSet(node, arg);
2037 }
2038
2039 @override
2040 R visitTopLevelGetterSet(
2041 SendSet node,
2042 FunctionElement getter,
2043 Node rhs,
2044 A arg) {
2045 return bulkHandleSet(node, arg);
2046 }
2047
2048 @override
2049 R visitTypeVariableTypeLiteralSet(
2050 SendSet node,
2051 TypeVariableElement element,
2052 Node rhs,
2053 A arg) {
2054 return bulkHandleSet(node, arg);
2055 }
2056
2057 @override
2058 R visitTypedefTypeLiteralSet(
2059 SendSet node,
2060 ConstantExpression constant,
2061 Node rhs,
2062 A arg) {
2063 return bulkHandleSet(node, arg);
2064 }
2065
2066 @override
2067 R visitUnresolvedSet(
2068 Send node,
2069 Element element,
2070 Node rhs,
2071 A arg) {
2072 return bulkHandleSet(node, arg);
2073 }
2074 } 2074 }
2075 2075
2076 /// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor] 2076 /// Mixin that implements all `visitXIndexSet` methods of [SemanticSendVisitor]
2077 /// by delegating to a bulk handler. 2077 /// by delegating to a bulk handler.
2078 /// 2078 ///
2079 /// Use this mixin to provide a trivial implementation for all `visitXIndexSet` 2079 /// Use this mixin to provide a trivial implementation for all `visitXIndexSet`
2080 /// methods. 2080 /// methods.
2081 abstract class IndexSetBulkMixin<R, A> 2081 abstract class IndexSetBulkMixin<R, A>
2082 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> { 2082 implements SemanticSendVisitor<R, A>, BulkHandle<R, A> {
2083 2083
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
3388 @override 3388 @override
3389 R errorInvalidAssert( 3389 R errorInvalidAssert(
3390 Send node, 3390 Send node,
3391 NodeList arguments, 3391 NodeList arguments,
3392 A arg) { 3392 A arg) {
3393 apply(arguments, arg); 3393 apply(arguments, arg);
3394 return null; 3394 return null;
3395 } 3395 }
3396 3396
3397 @override 3397 @override
3398 R errorClassTypeLiteralSet( 3398 R visitClassTypeLiteralSet(
3399 SendSet node, 3399 SendSet node,
3400 ConstantExpression constant, 3400 ConstantExpression constant,
3401 Node rhs, 3401 Node rhs,
3402 A arg) { 3402 A arg) {
3403 apply(rhs, arg); 3403 apply(rhs, arg);
3404 return null; 3404 return null;
3405 } 3405 }
3406 3406
3407 @override 3407 @override
3408 R errorDynamicTypeLiteralSet( 3408 R visitDynamicTypeLiteralSet(
3409 SendSet node, 3409 SendSet node,
3410 ConstantExpression constant, 3410 ConstantExpression constant,
3411 Node rhs, 3411 Node rhs,
3412 A arg) { 3412 A arg) {
3413 apply(rhs, arg); 3413 apply(rhs, arg);
3414 return null; 3414 return null;
3415 } 3415 }
3416 3416
3417 @override 3417 @override
3418 R visitFinalLocalVariableCompound( 3418 R visitFinalLocalVariableCompound(
3419 Send node, 3419 Send node,
3420 LocalVariableElement variable, 3420 LocalVariableElement variable,
3421 AssignmentOperator operator, 3421 AssignmentOperator operator,
3422 Node rhs, 3422 Node rhs,
3423 A arg) { 3423 A arg) {
3424 apply(rhs, arg); 3424 apply(rhs, arg);
3425 return null; 3425 return null;
3426 } 3426 }
3427 3427
3428 @override 3428 @override
3429 R errorFinalLocalVariableSet( 3429 R visitFinalLocalVariableSet(
3430 SendSet node, 3430 SendSet node,
3431 LocalVariableElement variable, 3431 LocalVariableElement variable,
3432 Node rhs, 3432 Node rhs,
3433 A arg) { 3433 A arg) {
3434 apply(rhs, arg); 3434 apply(rhs, arg);
3435 return null; 3435 return null;
3436 } 3436 }
3437 3437
3438 @override 3438 @override
3439 R visitFinalParameterCompound( 3439 R visitFinalParameterCompound(
3440 Send node, 3440 Send node,
3441 ParameterElement parameter, 3441 ParameterElement parameter,
3442 AssignmentOperator operator, 3442 AssignmentOperator operator,
3443 Node rhs, 3443 Node rhs,
3444 A arg) { 3444 A arg) {
3445 apply(rhs, arg); 3445 apply(rhs, arg);
3446 return null; 3446 return null;
3447 } 3447 }
3448 3448
3449 @override 3449 @override
3450 R errorFinalParameterSet( 3450 R visitFinalParameterSet(
3451 SendSet node, 3451 SendSet node,
3452 ParameterElement parameter, 3452 ParameterElement parameter,
3453 Node rhs, 3453 Node rhs,
3454 A arg) { 3454 A arg) {
3455 apply(rhs, arg); 3455 apply(rhs, arg);
3456 return null; 3456 return null;
3457 } 3457 }
3458 3458
3459 @override 3459 @override
3460 R visitFinalStaticFieldCompound( 3460 R visitFinalStaticFieldCompound(
3461 Send node, 3461 Send node,
3462 FieldElement field, 3462 FieldElement field,
3463 AssignmentOperator operator, 3463 AssignmentOperator operator,
3464 Node rhs, 3464 Node rhs,
3465 A arg) { 3465 A arg) {
3466 apply(rhs, arg); 3466 apply(rhs, arg);
3467 return null; 3467 return null;
3468 } 3468 }
3469 3469
3470 @override 3470 @override
3471 R errorFinalStaticFieldSet( 3471 R visitFinalStaticFieldSet(
3472 SendSet node, 3472 SendSet node,
3473 FieldElement field, 3473 FieldElement field,
3474 Node rhs, 3474 Node rhs,
3475 A arg) { 3475 A arg) {
3476 apply(rhs, arg); 3476 apply(rhs, arg);
3477 return null; 3477 return null;
3478 } 3478 }
3479 3479
3480 @override 3480 @override
3481 R errorFinalSuperFieldSet( 3481 R visitFinalSuperFieldSet(
3482 SendSet node, 3482 SendSet node,
3483 FieldElement field, 3483 FieldElement field,
3484 Node rhs, 3484 Node rhs,
3485 A arg) { 3485 A arg) {
3486 apply(rhs, arg); 3486 apply(rhs, arg);
3487 return null; 3487 return null;
3488 } 3488 }
3489 3489
3490 @override 3490 @override
3491 R visitFinalTopLevelFieldCompound( 3491 R visitFinalTopLevelFieldCompound(
3492 Send node, 3492 Send node,
3493 FieldElement field, 3493 FieldElement field,
3494 AssignmentOperator operator, 3494 AssignmentOperator operator,
3495 Node rhs, 3495 Node rhs,
3496 A arg) { 3496 A arg) {
3497 apply(rhs, arg); 3497 apply(rhs, arg);
3498 return null; 3498 return null;
3499 } 3499 }
3500 3500
3501 @override 3501 @override
3502 R errorFinalTopLevelFieldSet( 3502 R visitFinalTopLevelFieldSet(
3503 SendSet node, 3503 SendSet node,
3504 FieldElement field, 3504 FieldElement field,
3505 Node rhs, 3505 Node rhs,
3506 A arg) { 3506 A arg) {
3507 apply(rhs, arg); 3507 apply(rhs, arg);
3508 return null; 3508 return null;
3509 } 3509 }
3510 3510
3511 @override 3511 @override
3512 R visitLocalFunctionCompound( 3512 R visitLocalFunctionCompound(
(...skipping 18 matching lines...) Expand all
3531 @override 3531 @override
3532 R visitLocalFunctionPrefix( 3532 R visitLocalFunctionPrefix(
3533 Send node, 3533 Send node,
3534 LocalFunctionElement function, 3534 LocalFunctionElement function,
3535 IncDecOperator operator, 3535 IncDecOperator operator,
3536 A arg) { 3536 A arg) {
3537 return null; 3537 return null;
3538 } 3538 }
3539 3539
3540 @override 3540 @override
3541 R errorLocalFunctionSet( 3541 R visitLocalFunctionSet(
3542 SendSet node, 3542 SendSet node,
3543 LocalFunctionElement function, 3543 LocalFunctionElement function,
3544 Node rhs, 3544 Node rhs,
3545 A arg) { 3545 A arg) {
3546 apply(rhs, arg); 3546 apply(rhs, arg);
3547 return null; 3547 return null;
3548 } 3548 }
3549 3549
3550 @override 3550 @override
3551 R errorStaticFunctionSet( 3551 R visitStaticFunctionSet(
3552 Send node, 3552 Send node,
3553 MethodElement function, 3553 MethodElement function,
3554 Node rhs, 3554 Node rhs,
3555 A arg) { 3555 A arg) {
3556 apply(rhs, arg); 3556 apply(rhs, arg);
3557 return null; 3557 return null;
3558 } 3558 }
3559 3559
3560 @override 3560 @override
3561 R errorStaticGetterSet( 3561 R visitStaticGetterSet(
3562 SendSet node, 3562 SendSet node,
3563 FunctionElement getter, 3563 FunctionElement getter,
3564 Node rhs, 3564 Node rhs,
3565 A arg) { 3565 A arg) {
3566 apply(rhs, arg); 3566 apply(rhs, arg);
3567 return null; 3567 return null;
3568 } 3568 }
3569 3569
3570 @override 3570 @override
3571 R errorStaticSetterGet( 3571 R visitStaticSetterGet(
3572 Send node, 3572 Send node,
3573 FunctionElement setter, 3573 FunctionElement setter,
3574 A arg) { 3574 A arg) {
3575 return null; 3575 return null;
3576 } 3576 }
3577 3577
3578 @override 3578 @override
3579 R errorStaticSetterInvoke( 3579 R visitStaticSetterInvoke(
3580 Send node, 3580 Send node,
3581 FunctionElement setter, 3581 FunctionElement setter,
3582 NodeList arguments, 3582 NodeList arguments,
3583 CallStructure callStructure, 3583 CallStructure callStructure,
3584 A arg) { 3584 A arg) {
3585 apply(arguments, arg); 3585 apply(arguments, arg);
3586 return null; 3586 return null;
3587 } 3587 }
3588 3588
3589 @override 3589 @override
3590 R errorSuperGetterSet( 3590 R visitSuperGetterSet(
3591 SendSet node, 3591 SendSet node,
3592 FunctionElement getter, 3592 FunctionElement getter,
3593 Node rhs, 3593 Node rhs,
3594 A arg) { 3594 A arg) {
3595 apply(rhs, arg); 3595 apply(rhs, arg);
3596 return null; 3596 return null;
3597 } 3597 }
3598 3598
3599 @override 3599 @override
3600 R errorSuperMethodSet( 3600 R visitSuperMethodSet(
3601 Send node, 3601 Send node,
3602 MethodElement method, 3602 MethodElement method,
3603 Node rhs, 3603 Node rhs,
3604 A arg) { 3604 A arg) {
3605 apply(rhs, arg); 3605 apply(rhs, arg);
3606 return null; 3606 return null;
3607 } 3607 }
3608 3608
3609 @override 3609 @override
3610 R errorSuperSetterGet( 3610 R visitSuperSetterGet(
3611 Send node, 3611 Send node,
3612 FunctionElement setter, 3612 FunctionElement setter,
3613 A arg) { 3613 A arg) {
3614 return null; 3614 return null;
3615 } 3615 }
3616 3616
3617 @override 3617 @override
3618 R errorSuperSetterInvoke( 3618 R visitSuperSetterInvoke(
3619 Send node, 3619 Send node,
3620 FunctionElement setter, 3620 FunctionElement setter,
3621 NodeList arguments, 3621 NodeList arguments,
3622 CallStructure callStructure, 3622 CallStructure callStructure,
3623 A arg) { 3623 A arg) {
3624 apply(arguments, arg); 3624 apply(arguments, arg);
3625 return null; 3625 return null;
3626 } 3626 }
3627 3627
3628 @override 3628 @override
3629 R errorTopLevelFunctionSet( 3629 R visitTopLevelFunctionSet(
3630 Send node, 3630 Send node,
3631 MethodElement function, 3631 MethodElement function,
3632 Node rhs, 3632 Node rhs,
3633 A arg) { 3633 A arg) {
3634 apply(rhs, arg); 3634 apply(rhs, arg);
3635 return null; 3635 return null;
3636 } 3636 }
3637 3637
3638 @override 3638 @override
3639 R errorTopLevelGetterSet( 3639 R visitTopLevelGetterSet(
3640 SendSet node, 3640 SendSet node,
3641 FunctionElement getter, 3641 FunctionElement getter,
3642 Node rhs, 3642 Node rhs,
3643 A arg) { 3643 A arg) {
3644 apply(rhs, arg); 3644 apply(rhs, arg);
3645 return null; 3645 return null;
3646 } 3646 }
3647 3647
3648 @override 3648 @override
3649 R errorTopLevelSetterGet( 3649 R visitTopLevelSetterGet(
3650 Send node, 3650 Send node,
3651 FunctionElement setter, 3651 FunctionElement setter,
3652 A arg) { 3652 A arg) {
3653 return null; 3653 return null;
3654 } 3654 }
3655 3655
3656 @override 3656 @override
3657 R errorTopLevelSetterInvoke( 3657 R visitTopLevelSetterInvoke(
3658 Send node, 3658 Send node,
3659 FunctionElement setter, 3659 FunctionElement setter,
3660 NodeList arguments, 3660 NodeList arguments,
3661 CallStructure callStructure, 3661 CallStructure callStructure,
3662 A arg) { 3662 A arg) {
3663 apply(arguments, arg); 3663 apply(arguments, arg);
3664 return null; 3664 return null;
3665 } 3665 }
3666 3666
3667 @override 3667 @override
3668 R errorTypeVariableTypeLiteralSet( 3668 R visitTypeVariableTypeLiteralSet(
3669 SendSet node, 3669 SendSet node,
3670 TypeVariableElement element, 3670 TypeVariableElement element,
3671 Node rhs, 3671 Node rhs,
3672 A arg) { 3672 A arg) {
3673 apply(rhs, arg); 3673 apply(rhs, arg);
3674 return null; 3674 return null;
3675 } 3675 }
3676 3676
3677 @override 3677 @override
3678 R errorTypedefTypeLiteralSet( 3678 R visitTypedefTypeLiteralSet(
3679 SendSet node, 3679 SendSet node,
3680 ConstantExpression constant, 3680 ConstantExpression constant,
3681 Node rhs, 3681 Node rhs,
3682 A arg) { 3682 A arg) {
3683 apply(rhs, arg); 3683 apply(rhs, arg);
3684 return null; 3684 return null;
3685 } 3685 }
3686 3686
3687 @override 3687 @override
3688 R visitUnresolvedSuperIndex( 3688 R visitUnresolvedSuperIndex(
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after
5113 @override 5113 @override
5114 R visitUnresolvedPrefix( 5114 R visitUnresolvedPrefix(
5115 Send node, 5115 Send node,
5116 Element element, 5116 Element element,
5117 IncDecOperator operator, 5117 IncDecOperator operator,
5118 A arg) { 5118 A arg) {
5119 return null; 5119 return null;
5120 } 5120 }
5121 5121
5122 @override 5122 @override
5123 R errorUnresolvedSet( 5123 R visitUnresolvedSet(
5124 Send node, 5124 Send node,
5125 Element element, 5125 Element element,
5126 Node rhs, 5126 Node rhs,
5127 A arg) { 5127 A arg) {
5128 apply(rhs, arg); 5128 apply(rhs, arg);
5129 return null; 5129 return null;
5130 } 5130 }
5131 5131
5132 @override 5132 @override
5133 R errorUndefinedBinaryExpression( 5133 R errorUndefinedBinaryExpression(
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
6393 MethodElement function, 6393 MethodElement function,
6394 NodeList arguments, 6394 NodeList arguments,
6395 CallStructure callStructure, 6395 CallStructure callStructure,
6396 A arg); 6396 A arg);
6397 6397
6398 R handleStaticGetterGet( 6398 R handleStaticGetterGet(
6399 Send node, 6399 Send node,
6400 FunctionElement getter, 6400 FunctionElement getter,
6401 A arg); 6401 A arg);
6402 6402
6403 R handleStaticGetterSet(
6404 Send node,
6405 FunctionElement getter,
6406 Node rhs,
6407 A arg);
6408
6403 R handleStaticGetterInvoke( 6409 R handleStaticGetterInvoke(
6404 Send node, 6410 Send node,
6405 FunctionElement getter, 6411 FunctionElement getter,
6406 NodeList arguments, 6412 NodeList arguments,
6407 CallStructure callStructure, 6413 CallStructure callStructure,
6408 A arg); 6414 A arg);
6409 6415
6416 R handleStaticSetterGet(
6417 SendSet node,
6418 FunctionElement setter,
6419 A arg);
6420
6410 R handleStaticSetterSet( 6421 R handleStaticSetterSet(
6411 SendSet node, 6422 SendSet node,
6412 FunctionElement setter, 6423 FunctionElement setter,
6413 Node rhs, 6424 Node rhs,
6414 A arg); 6425 A arg);
6415 6426
6427 R handleStaticSetterInvoke(
6428 Send node,
6429 FunctionElement setter,
6430 NodeList arguments,
6431 CallStructure callStructure,
6432 A arg);
6433
6434 R handleFinalStaticFieldSet(
6435 SendSet node,
6436 FieldElement field,
6437 Node rhs,
6438 A arg);
6439
6440 R handleStaticFunctionSet(
6441 SendSet node,
6442 MethodElement function,
6443 Node rhs,
6444 A arg);
6445
6416 @override 6446 @override
6417 R visitStaticFieldGet( 6447 R visitStaticFieldGet(
6418 Send node, 6448 Send node,
6419 FieldElement field, 6449 FieldElement field,
6420 A arg) { 6450 A arg) {
6421 return handleStaticFieldGet(node, field, arg); 6451 return handleStaticFieldGet(node, field, arg);
6422 } 6452 }
6423 6453
6424 @override 6454 @override
6425 R visitStaticFieldInvoke( 6455 R visitStaticFieldInvoke(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
6557 6587
6558 @override 6588 @override
6559 R visitTopLevelGetterGet( 6589 R visitTopLevelGetterGet(
6560 Send node, 6590 Send node,
6561 FunctionElement getter, 6591 FunctionElement getter,
6562 A arg) { 6592 A arg) {
6563 return handleStaticGetterGet(node, getter, arg); 6593 return handleStaticGetterGet(node, getter, arg);
6564 } 6594 }
6565 6595
6566 @override 6596 @override
6597 R visitTopLevelGetterSet(
6598 SendSet node,
6599 FunctionElement getter,
6600 Node rhs,
6601 A arg) {
6602 return handleStaticGetterSet(node, getter, rhs, arg);
6603 }
6604
6605 @override
6567 R visitTopLevelGetterInvoke( 6606 R visitTopLevelGetterInvoke(
6568 Send node, 6607 Send node,
6569 FunctionElement getter, 6608 FunctionElement getter,
6570 NodeList arguments, 6609 NodeList arguments,
6571 CallStructure callStructure, 6610 CallStructure callStructure,
6572 A arg) { 6611 A arg) {
6573 return handleStaticGetterInvoke( 6612 return handleStaticGetterInvoke(
6574 node, getter, arguments, callStructure, arg); 6613 node, getter, arguments, callStructure, arg);
6575 } 6614 }
6576 6615
6577 @override 6616 @override
6578 R visitTopLevelSetterSet( 6617 R visitTopLevelSetterSet(
6579 SendSet node, 6618 SendSet node,
6580 FunctionElement setter, 6619 FunctionElement setter,
6581 Node rhs, 6620 Node rhs,
6582 A arg) { 6621 A arg) {
6583 return handleStaticSetterSet(node, setter, rhs, arg); 6622 return handleStaticSetterSet(node, setter, rhs, arg);
6584 } 6623 }
6624
6625 @override
6626 R visitStaticSetterInvoke(
6627 Send node,
6628 FunctionElement setter,
6629 NodeList arguments,
6630 CallStructure callStructure,
6631 A arg) {
6632 return handleStaticSetterInvoke(
6633 node, setter, arguments, callStructure, arg);
6634 }
6635
6636 @override
6637 R visitTopLevelSetterInvoke(
6638 Send node,
6639 FunctionElement setter,
6640 NodeList arguments,
6641 CallStructure callStructure,
6642 A arg) {
6643 return handleStaticSetterInvoke(
6644 node, setter, arguments, callStructure, arg);
6645 }
6646
6647 @override
6648 R visitStaticSetterGet(
6649 Send node,
6650 FunctionElement setter,
6651 A arg) {
6652 return handleStaticSetterGet(node, setter, arg);
6653 }
6654
6655 @override
6656 R visitStaticGetterSet(
6657 SendSet node,
6658 FunctionElement getter,
6659 Node rhs,
6660 A arg) {
6661 return handleStaticGetterSet(node, getter, rhs, arg);
6662 }
6663
6664 @override
6665 R visitTopLevelSetterGet(
6666 Send node,
6667 FunctionElement setter,
6668 A arg) {
6669 return handleStaticSetterGet(node, setter, arg);
6670 }
6671
6672 @override
6673 R visitFinalStaticFieldSet(
6674 SendSet node,
6675 FieldElement field,
6676 Node rhs,
6677 A arg) {
6678 return handleFinalStaticFieldSet(node, field, rhs, arg);
6679 }
6680
6681 @override
6682 R visitFinalTopLevelFieldSet(
6683 SendSet node,
6684 FieldElement field,
6685 Node rhs,
6686 A arg) {
6687 return handleFinalStaticFieldSet(node, field, rhs, arg);
6688 }
6689
6690 @override
6691 R visitStaticFunctionSet(
6692 Send node,
6693 MethodElement function,
6694 Node rhs,
6695 A arg) {
6696 return handleStaticFunctionSet(node, function, rhs, arg);
6697 }
6698
6699 @override
6700 R visitTopLevelFunctionSet(
6701 Send node,
6702 MethodElement function,
6703 Node rhs,
6704 A arg) {
6705 return handleStaticFunctionSet(node, function, rhs, arg);
6706 }
6585 } 6707 }
6586 6708
6587 /// Mixin that groups all compounds visitors `visitStaticX` and `visitTopLevelX` 6709 /// Mixin that groups all compounds visitors `visitStaticX` and `visitTopLevelX`
6588 /// method by delegating calls to `handleStaticX` methods. 6710 /// method by delegating calls to `handleStaticX` methods.
6589 /// 6711 ///
6590 /// This mixin is useful for the cases where both top level members and static 6712 /// This mixin is useful for the cases where both top level members and static
6591 /// class members are handled uniformly. 6713 /// class members are handled uniformly.
6592 abstract class BaseImplementationOfStaticCompoundsMixin<R, A> 6714 abstract class BaseImplementationOfStaticCompoundsMixin<R, A>
6593 implements SemanticSendVisitor<R, A> { 6715 implements SemanticSendVisitor<R, A> {
6594 R handleStaticFieldCompound( 6716 R handleStaticFieldCompound(
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
7042 NodeList arguments, 7164 NodeList arguments,
7043 CallStructure callStructure, 7165 CallStructure callStructure,
7044 A arg); 7166 A arg);
7045 7167
7046 R handleLocalSet( 7168 R handleLocalSet(
7047 SendSet node, 7169 SendSet node,
7048 LocalElement element, 7170 LocalElement element,
7049 Node rhs, 7171 Node rhs,
7050 A arg); 7172 A arg);
7051 7173
7174 R handleImmutableLocalSet(
7175 SendSet node,
7176 LocalElement element,
7177 Node rhs,
7178 A arg);
7179
7052 @override 7180 @override
7053 R visitLocalFunctionGet( 7181 R visitLocalFunctionGet(
7054 Send node, 7182 Send node,
7055 LocalFunctionElement function, 7183 LocalFunctionElement function,
7056 A arg) { 7184 A arg) {
7057 return handleLocalGet(node, function, arg); 7185 return handleLocalGet(node, function, arg);
7058 } 7186 }
7059 7187
7060 @override 7188 @override
7061 R visitLocalFunctionInvoke( 7189 R visitLocalFunctionInvoke(
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
7113 } 7241 }
7114 7242
7115 @override 7243 @override
7116 R visitParameterSet( 7244 R visitParameterSet(
7117 SendSet node, 7245 SendSet node,
7118 ParameterElement parameter, 7246 ParameterElement parameter,
7119 Node rhs, 7247 Node rhs,
7120 A arg) { 7248 A arg) {
7121 return handleLocalSet(node, parameter, rhs, arg); 7249 return handleLocalSet(node, parameter, rhs, arg);
7122 } 7250 }
7251
7252 @override
7253 R visitFinalLocalVariableSet(
7254 SendSet node,
7255 LocalVariableElement variable,
7256 Node rhs,
7257 A arg) {
7258 return handleImmutableLocalSet(node, variable, rhs, arg);
7259 }
7260
7261 @override
7262 R visitFinalParameterSet(
7263 SendSet node,
7264 ParameterElement parameter,
7265 Node rhs,
7266 A arg) {
7267 return handleImmutableLocalSet(node, parameter, rhs, arg);
7268 }
7269
7270 @override
7271 R visitLocalFunctionSet(
7272 SendSet node,
7273 LocalFunctionElement function,
7274 Node rhs,
7275 A arg) {
7276 return handleImmutableLocalSet(node, function, rhs, arg);
7277 }
7123 } 7278 }
7124 7279
7125 /// Mixin that groups all compound `visitLocalX` and `visitParameterX` methods 7280 /// Mixin that groups all compound `visitLocalX` and `visitParameterX` methods
7126 /// by delegating calls to `handleLocalX` methods. 7281 /// by delegating calls to `handleLocalX` methods.
7127 /// 7282 ///
7128 /// This mixin is useful for the cases where both parameters, local variables, 7283 /// This mixin is useful for the cases where both parameters, local variables,
7129 /// and local functions, captured or not, are handled uniformly. 7284 /// and local functions, captured or not, are handled uniformly.
7130 abstract class BaseImplementationOfLocalCompoundsMixin<R, A> 7285 abstract class BaseImplementationOfLocalCompoundsMixin<R, A>
7131 implements SemanticSendVisitor<R, A> { 7286 implements SemanticSendVisitor<R, A> {
7132 R handleLocalCompound( 7287 R handleLocalCompound(
(...skipping 3032 matching lines...) Expand 10 before | Expand all | Expand 10 after
10165 NewExpression node, 10320 NewExpression node,
10166 ConstructorElement constructor, 10321 ConstructorElement constructor,
10167 InterfaceType type, 10322 InterfaceType type,
10168 NodeList arguments, 10323 NodeList arguments,
10169 CallStructure callStructure, 10324 CallStructure callStructure,
10170 A arg) { 10325 A arg) {
10171 return handleConstructorInvoke( 10326 return handleConstructorInvoke(
10172 node, constructor, type, arguments, callStructure, arg); 10327 node, constructor, type, arguments, callStructure, arg);
10173 } 10328 }
10174 } 10329 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/semantic_visitor.dart ('k') | pkg/compiler/lib/src/resolution/send_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698