-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ParseableInterfaces] Skip value witnesses of resilient conformances #20419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ParseableInterfaces] Skip value witnesses of resilient conformances #20419
Conversation
@swift-ci Please test |
Build failed |
@@ -2850,6 +2833,23 @@ void ConformanceChecker::checkNonFinalClassWitness(ValueDecl *requirement, | |||
} | |||
} | |||
|
|||
ResolveWitnessResult | |||
ConformanceChecker::resolveWitnessAsOpaque(ValueDecl *requirement) { | |||
assert(!isa<AssociatedTypeDecl>(requirement) && "Use resolveTypeWitnessVia*"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the reason this doesn't just take an Answered by looking below.AssociatedTypeDecl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The whole conformance-checking logic is split between type witnesses and non-type witnesses, and in practice it makes sense because they're resolved pretty differently. In this case, you can't actually make an associated type opaque, so the assertion makes sense.
Build failed |
Also depends on #20437. I'll rebase once that goes in. |
checkConformance was pretty long. No functionality change.
No functionality change.
We can't devirtualize through these conformances anyway, so we can get a (probably tiny) speedup by not doing any resolution of non-type witnesses. rdar://problem/43824088
97bcb4f
to
61dd307
Compare
@swift-ci Please test |
Build failed |
Build failed |
This turned out to cause some problems. I'll write up test cases this afternoon, but with #20485 there's at least not a correctness issue. Reverting. |
…rmances" This reverts commit 61dd307, the effective part of swiftlang#20419. rdar://problem/43824088
We can't devirtualize through these conformances anyway, so we can get a (probably tiny) speedup by not doing any resolution of non-type witnesses.
Based on top of #20390. I suggest reviewing commit by commit.
rdar://problem/43824088