Commit b6acd6c
authored
Fixes #25624
Separation checking for captures relies on `unsafeAssumeSeparate` to opt
out of separation checking. To detect such code, `SepCheck` uses
structural matching on the trees. Coverage phase may lift some trees,
breaking the assumptions about the structure.
This PR:
- Opts `unsafeAssumeSeparate` out of coverage instrumentation - we
aren't really interested in coverage info on it anyway, only the body is
interesting
- On lifting time, marks coverage-lifted synthetic trees with an
explicit attachment
- On `SepCheck` time, opts-out synthetic trees created by coverage from
separation checking - rationalle being we have already checked their rhs
for separation on assignment time
## How much have you relied on LLM-based tools in this contribution?
Moderately.
## How was the solution tested?
- Ran the full bootstrapped `testCompilation --enable-coverage-phase`
suite
- Run the compiler `pos` suite
- Reproduced failing tests individually before and after the fix
## Additional notes
I am not familiar with the captures codebase, so can use help of someone
familiar with it to review this PR.
1 parent a06284b commit b6acd6c
4 files changed
Lines changed: 91 additions & 57 deletions
File tree
- compiler
- src/dotty/tools/dotc
- cc
- transform
- typer
- test/dotc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
599 | 600 | | |
600 | 601 | | |
601 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
602 | 612 | | |
603 | 613 | | |
604 | 614 | | |
605 | 615 | | |
606 | 616 | | |
607 | 617 | | |
608 | | - | |
| 618 | + | |
609 | 619 | | |
610 | 620 | | |
611 | 621 | | |
| |||
994 | 1004 | | |
995 | 1005 | | |
996 | 1006 | | |
| 1007 | + | |
| 1008 | + | |
997 | 1009 | | |
998 | 1010 | | |
999 | 1011 | | |
1000 | 1012 | | |
1001 | 1013 | | |
1002 | 1014 | | |
1003 | 1015 | | |
| 1016 | + | |
1004 | 1017 | | |
1005 | 1018 | | |
1006 | 1019 | | |
| |||
Lines changed: 71 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
21 | | - | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
29 | 91 | | |
30 | 92 | | |
31 | 93 | | |
| |||
261 | 323 | | |
262 | 324 | | |
263 | 325 | | |
264 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
265 | 330 | | |
266 | 331 | | |
267 | 332 | | |
| |||
501 | 566 | | |
502 | 567 | | |
503 | 568 | | |
504 | | - | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
505 | 572 | | |
506 | 573 | | |
507 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
66 | | - | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
| 73 | + | |
70 | 74 | | |
71 | 75 | | |
72 | 76 | | |
| |||
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | 194 | | |
238 | 195 | | |
239 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | | - | |
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | 40 | | |
43 | | - | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
0 commit comments