Commit c270597
committed
SIL: Fix false positive in FlowIsolation with DynamicSelfType usage
If an instruction references the DynamicSelfType by calling a
static member with `Self.foo()`, we consider this a type-dependent
use of `self`. This means that at runtime we may need to load the
isa pointer, but we don't need to touch any other protected state
from the instance.
Therefore, we can skip type-dependent uses in the analysis to
avoid false positives in this case.
An existing test case already exercised the overly-conservative
behavior, so I just updated it to not expect an error.
Fixes rdar://129676769.1 parent 3dd4198 commit c270597
File tree
2 files changed
+7
-2
lines changed- lib/SILOptimizer/Mandatory
- test/Concurrency
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
585 | 591 | | |
586 | 592 | | |
587 | 593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
684 | 684 | | |
685 | 685 | | |
686 | 686 | | |
687 | | - | |
688 | | - | |
| 687 | + | |
689 | 688 | | |
690 | 689 | | |
691 | 690 | | |
| |||
0 commit comments