Commit 6efb8fa
committed
AST: Remove incorrect optimization from ASTContext::getOpenedExistentialSignature()
It is no longer true that the existential signature of `any P` is
always just `<Self where Self: P>`, because `P` might be `~Copyable`,
in which case `any P` is really `any P & Copyable`.
Just remove the micro-optimization here, because if we're building
an existential signature, we're likely going to be doing generic
signature queries, and then we'll need a Requirement Machine anyway.
This happened to manifest in the SIL optimizer when performing the
concrete existential peephole with `any Sendable`, since Sendable is
now ~Copyable.
Fixes rdar://problem/126079282.1 parent c329718 commit 6efb8fa
File tree
2 files changed
+25
-12
lines changed- lib/AST
- test/SILOptimizer
2 files changed
+25
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5867 | 5867 | | |
5868 | 5868 | | |
5869 | 5869 | | |
5870 | | - | |
5871 | | - | |
5872 | | - | |
5873 | | - | |
5874 | | - | |
5875 | | - | |
5876 | | - | |
5877 | | - | |
5878 | | - | |
5879 | | - | |
5880 | | - | |
5881 | | - | |
5882 | 5870 | | |
5883 | 5871 | | |
5884 | 5872 | | |
| |||
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
0 commit comments