Commit 7198fb9
[analyzer] Use TypeImpl for context types.
The signatures of `ExpressionImpl.resolveExpression` and all of its
overrides are changed so that they expect a context which is a
`TypeImpl` rather than a `DartType`. The signatures of expression
`visit` methods in `ResolverVisitor` are changed in a similar way.
To reduce the number of casts that this introduces, several fields and
methods in the following classes have their types changed to use
"Impl" types:
- `ElementResolver`
- `FunctionExpressionInvocationResolver`
- `GenericFunctionInferenceTest`
- `GenericInferrer`
- `InstanceCreationExpressionResolver`
- `InterfaceElementImpl`
- `InterfaceElementImpl2`
- `InterfacesMerger`
- `InterfaceTypeImpl`
- `InvocationInferenceHelper`
- `InvocationInferrer`
- `MethodElementImpl2`
- `MethodInvocationResolver`
- `MixinElementImpl`
- `MixinElementImpl2`
- `NamedTypeResolver`
- `ResolutionReader`
- `ResolverVisitor`
- `Substitution`
- `TypedLiteralResolver`
- `TypeSystemImpl`
- `_ClassInterfaceType`
- `_LiteralResolution`
- `_MixinInference`
This is part of a larger arc of work to change the analyzer's use of
the shared code so that the type parameters it supplies are not part
of the analyzer public API. See
#59763.
Change-Id: I11d476d712846c28b05e0fa1a5972fb7585e114a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405101
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Paul Berry <[email protected]>1 parent eb69196 commit 7198fb9
File tree
21 files changed
+255
-220
lines changed- pkg/analyzer
- lib/src
- dart
- ast
- element
- resolver
- error
- generated
- summary2
- test/src/dart/element
21 files changed
+255
-220
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | | - | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | | - | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
143 | | - | |
| 144 | + | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
150 | | - | |
| 151 | + | |
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
167 | | - | |
| 167 | + | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
171 | | - | |
| 172 | + | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
| 187 | + | |
186 | 188 | | |
187 | 189 | | |
188 | 190 | | |
189 | | - | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
200 | | - | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | | - | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6079 | 6079 | | |
6080 | 6080 | | |
6081 | 6081 | | |
6082 | | - | |
| 6082 | + | |
6083 | 6083 | | |
6084 | 6084 | | |
6085 | 6085 | | |
6086 | | - | |
| 6086 | + | |
6087 | 6087 | | |
6088 | 6088 | | |
6089 | 6089 | | |
6090 | 6090 | | |
6091 | | - | |
| 6091 | + | |
6092 | 6092 | | |
6093 | 6093 | | |
6094 | 6094 | | |
| |||
6157 | 6157 | | |
6158 | 6158 | | |
6159 | 6159 | | |
6160 | | - | |
| 6160 | + | |
6161 | 6161 | | |
6162 | 6162 | | |
6163 | 6163 | | |
6164 | 6164 | | |
6165 | 6165 | | |
6166 | | - | |
| 6166 | + | |
| 6167 | + | |
| 6168 | + | |
6167 | 6169 | | |
6168 | 6170 | | |
6169 | 6171 | | |
| |||
6188 | 6190 | | |
6189 | 6191 | | |
6190 | 6192 | | |
6191 | | - | |
| 6193 | + | |
6192 | 6194 | | |
6193 | 6195 | | |
6194 | 6196 | | |
6195 | | - | |
| 6197 | + | |
| 6198 | + | |
| 6199 | + | |
6196 | 6200 | | |
6197 | 6201 | | |
6198 | 6202 | | |
| |||
6201 | 6205 | | |
6202 | 6206 | | |
6203 | 6207 | | |
6204 | | - | |
| 6208 | + | |
| 6209 | + | |
| 6210 | + | |
6205 | 6211 | | |
6206 | 6212 | | |
6207 | 6213 | | |
| |||
6210 | 6216 | | |
6211 | 6217 | | |
6212 | 6218 | | |
6213 | | - | |
| 6219 | + | |
6214 | 6220 | | |
6215 | 6221 | | |
6216 | 6222 | | |
6217 | 6223 | | |
6218 | 6224 | | |
6219 | | - | |
| 6225 | + | |
| 6226 | + | |
| 6227 | + | |
6220 | 6228 | | |
6221 | 6229 | | |
6222 | 6230 | | |
| |||
6508 | 6516 | | |
6509 | 6517 | | |
6510 | 6518 | | |
6511 | | - | |
6512 | | - | |
| 6519 | + | |
6513 | 6520 | | |
6514 | | - | |
| 6521 | + | |
6515 | 6522 | | |
6516 | 6523 | | |
6517 | 6524 | | |
| |||
6547 | 6554 | | |
6548 | 6555 | | |
6549 | 6556 | | |
6550 | | - | |
| 6557 | + | |
| 6558 | + | |
| 6559 | + | |
| 6560 | + | |
| 6561 | + | |
| 6562 | + | |
| 6563 | + | |
| 6564 | + | |
| 6565 | + | |
| 6566 | + | |
6551 | 6567 | | |
6552 | 6568 | | |
6553 | 6569 | | |
6554 | | - | |
| 6570 | + | |
| 6571 | + | |
| 6572 | + | |
6555 | 6573 | | |
6556 | 6574 | | |
6557 | 6575 | | |
6558 | 6576 | | |
6559 | 6577 | | |
6560 | 6578 | | |
6561 | 6579 | | |
6562 | | - | |
| 6580 | + | |
| 6581 | + | |
| 6582 | + | |
6563 | 6583 | | |
6564 | 6584 | | |
6565 | 6585 | | |
6566 | | - | |
| 6586 | + | |
6567 | 6587 | | |
6568 | 6588 | | |
6569 | 6589 | | |
| |||
8408 | 8428 | | |
8409 | 8429 | | |
8410 | 8430 | | |
8411 | | - | |
| 8431 | + | |
8412 | 8432 | | |
8413 | 8433 | | |
8414 | 8434 | | |
| |||
8446 | 8466 | | |
8447 | 8467 | | |
8448 | 8468 | | |
8449 | | - | |
| 8469 | + | |
8450 | 8470 | | |
8451 | 8471 | | |
8452 | 8472 | | |
| |||
8461 | 8481 | | |
8462 | 8482 | | |
8463 | 8483 | | |
8464 | | - | |
| 8484 | + | |
8465 | 8485 | | |
8466 | 8486 | | |
8467 | 8487 | | |
8468 | 8488 | | |
8469 | 8489 | | |
8470 | | - | |
| 8490 | + | |
| 8491 | + | |
| 8492 | + | |
8471 | 8493 | | |
8472 | 8494 | | |
8473 | 8495 | | |
8474 | | - | |
| 8496 | + | |
8475 | 8497 | | |
8476 | 8498 | | |
8477 | 8499 | | |
| |||
8506 | 8528 | | |
8507 | 8529 | | |
8508 | 8530 | | |
8509 | | - | |
| 8531 | + | |
8510 | 8532 | | |
8511 | 8533 | | |
8512 | 8534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
663 | 663 | | |
664 | 664 | | |
665 | 665 | | |
666 | | - | |
| 666 | + | |
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
823 | | - | |
| 822 | + | |
824 | 823 | | |
825 | 824 | | |
826 | 825 | | |
| |||
862 | 861 | | |
863 | 862 | | |
864 | 863 | | |
865 | | - | |
| 864 | + | |
866 | 865 | | |
867 | 866 | | |
868 | 867 | | |
| |||
1169 | 1168 | | |
1170 | 1169 | | |
1171 | 1170 | | |
1172 | | - | |
| 1171 | + | |
| 1172 | + | |
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | | - | |
| 200 | + | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| |||
0 commit comments