Skip to content

Mangle associated types of opaque types like dependent member types. … #27014

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

Merged
merged 2 commits into from
Sep 4, 2019

Conversation

jckarter
Copy link
Contributor

@jckarter jckarter commented Sep 4, 2019

The nested archetype mangling does not have enough information to accurately recover the associated type at runtime. This fixes rdar://problem/54084733.

Although this changes the mangling in both runtime and symbols, this should not affect ABI, because there is no way for associated types of opaque types to be surfaced in the types of public
declarations today.

Shipping Swift 5.1 runtimes do not support this new mangling, so back-deploy the fix by emitting a mangled string that refers to a \9 accessor function when targeting Swift 5.1.

@jckarter jckarter requested a review from DougGregor September 4, 2019 02:17
@jckarter
Copy link
Contributor Author

jckarter commented Sep 4, 2019

@swift-ci Please test

The archetype mangling does not have enough information to accurately recover the associated type
at runtime. This fixes rdar://problem/54084733.

Although this changes the mangling in both runtime and symbols, this should not affect ABI, because
there is no way for associated types of opaque types to be surfaced in the types of public
declarations today.
If we mangled an opaque associated type while targeting an older OS, we can use a \9
accessor reference string to instantiate the associated type.
@jckarter jckarter force-pushed the opaque-type-assoc-type-mangling branch from 1581dcf to 0ae86c9 Compare September 4, 2019 17:22
@jckarter
Copy link
Contributor Author

jckarter commented Sep 4, 2019

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Sep 4, 2019

Build failed
Swift Test Linux Platform
Git Sha - 1581dcf193ad493c49fefa45adab9878afe933f3

@swift-ci
Copy link
Contributor

swift-ci commented Sep 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - 1581dcf193ad493c49fefa45adab9878afe933f3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants