-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ABI] [Mangling] Only look for retroactive conformances in conditional reqs #21450
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
[ABI] [Mangling] Only look for retroactive conformances in conditional reqs #21450
Conversation
Fix to 510b64f. The mangling operator "HP" has to distinguish between "protocol" and "protocol module", not between the presence or absence of protocol-conformance-ref. New grammar: protocol-conformance-ref ::= protocol protocol-conformance-ref ::= protocol module 'HP' rdar://problem/46735592, again
Previously, the mangler searched for retroactive conformances in /any/ of a generic type's substitutions, but really we only care about the ones that affect the generic type's conformance, i.e. those that affect generic parameters. Refining this results in shorter mangled names involving instantiations of generic types. Follow-up work for rdar://problem/46735592
@swift-ci Please test |
@swift-ci Please test source compatibility |
Build failed |
There are a whole pile of LLDB failures on the Linux tests and I don't think they're related to this change. |
Build failed |
Same for the Mac bots. @swift-ci Please smoke test |
New(er) grammar: // same module as conforming type, or non-unique protocol-conformance-ref ::= protocol 'HP' // same module as protocol protocol-conformance-ref ::= protocol 'Hp' // retroactive protocol-conformance-ref ::= protocol module We don't make use of this distinction anywhere yet, but we could in the future.
New(er) grammar:
We don't make use of this distinction anywhere yet, but we could in the future. @rjmccall Looks good now? @swift-ci Please test |
@swift-ci Please test source compatibility |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
Yes, thanks!
[ABI] [Mangling] Only look for retroactive conformances in conditional reqs rdar://problem/46735592
Previously, the mangler searched for retroactive conformances in any of a generic type's substitutions, but really we only care about the ones that affect the generic type's conformance, i.e. those that affect generic parameters. Refining this results in shorter mangled names involving instantiations of generic types.
Builds on top of #21448. The last commit is the interesting one.
Follow-up work for rdar://problem/46735592.