-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Cherry pick some fixes to qualification branch #22819
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
Cherry pick some fixes to qualification branch #22819
Conversation
We no longer store the 'transparent' bit in the ApplyInst, so there's no need to recreate them.
This utility is generally a horrible idea but even worse the callers were not doing anything to ensure the required invariants actually held. Add a new canReplaceLoadSequence() method and chek it in the right places.
The basic theory here is as follows: - The resilience expansion never changes the lowered type, only the SIL type category (object or address). This means that function types always pass resilient values indirectly regardless of expansion, etc. - The getTypeLowering() methods all take an optional 'forExpansion' parameter. Soon, these will become non-optional and I'll audit all call sites to pass the right expansion; for convenience, the entry points on SILFunction will pass the right expansion. Places I need to revisit and pass the right expansion in are marked as 'FIXME: Expansion'. For now, this just fixes a SILCombiner bug. After some more plumbing this will enable SILGen to produce better code. Progress on <rdar://problem/24057844>, <https://bugs.swift.org/browse/SR-261>.
Apparently you can use a swift_name attribute in Clang to import types as members of Swift types. If the Swift type is not public, we would still try to serialize the witness thunks, which tripped SIL verifier checks since the witnesses themselves were not serialized. Note that the fix here is to just delete the special case of an imported conformance; the regular "type is public and protocol is public" condition suffices here. Fixes <rdar://problem/48218483>.
@swift-ci Please test |
Build failed |
Build failed |
This also contains a cherry-pick for a fix to Swift 5.0: 48226583 / #22737 |
If the conforming type is generic, we have to treat the conformance as resilient if it is defined outside of the current module. This is because it can resiliently change from being non-dependent to dependent.
411a2e0
to
4611412
Compare
@swift-ci Please test |
Build failed |
Build failed |
@swift-ci Please test |
Build failed |
Build failed |
… an apply has nothrow on the actual function_ref. Previously, we based it off of whether or not the original apply had a nothrow bit. This is incorrect in the case where we added an error result to a function without an error result. In such a case, we need to /not/ put on the nothrow bit. This commit generalizes this idea slightly by assuming that if we are asked to perform this transformation we should just match what the underlying function_ref (i.e. setting nothrow if the underlying function type has an error result and not setting nothrow if the underlying function type does not have an error result). rdar://47828439
@swift-ci Please test |
Build failed |
Turns out the tags are shuffled around by XORing with a per-process hash, and we have to deobfuscate the tag before checking if its an extended tag. There's no test for this; just running the existing tests several times in a row is sufficient to trigger the problem.
77cba37
to
8b01751
Compare
@swift-ci Please test |
Build failed |
Build failed |
rdar://problem/48218483