Commit 58db000
committed
Improve nullable analysis of local functions
This design tries to meld better analysis of nullable reference types in
local functions with performance. To keep the common case one pass,
local functions are analyzed using the starting state that is an
intersection of all the states before its usages (calls, delegate
conversions, etc), but the results of variables made nullable or
non-nullable inside the local function do not propagate to the callers.1 parent 0b8a8c0 commit 58db000
File tree
6 files changed
+281
-76
lines changed- src/Compilers/CSharp
- Portable/FlowAnalysis
- Test/Semantic/Semantics
6 files changed
+281
-76
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
1167 | 1168 | | |
1168 | 1169 | | |
1169 | 1170 | | |
1170 | | - | |
| 1171 | + | |
1171 | 1172 | | |
1172 | 1173 | | |
1173 | 1174 | | |
1174 | | - | |
1175 | 1175 | | |
1176 | 1176 | | |
1177 | 1177 | | |
| |||
1185 | 1185 | | |
1186 | 1186 | | |
1187 | 1187 | | |
| 1188 | + | |
1188 | 1189 | | |
1189 | 1190 | | |
1190 | 1191 | | |
| |||
Lines changed: 0 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | 80 | | |
97 | 81 | | |
98 | 82 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | 135 | | |
137 | 136 | | |
138 | 137 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
289 | 305 | | |
290 | 306 | | |
0 commit comments