Skip to content

[5.0 12-12-2018] [IRGen/Runtime] Anonymous context descriptors can (should be) generic. #21692

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Jan 8, 2019

Explanation: Anonymous context descriptors were being treated as non-generic by
IRGen, which lead to problems for (file)private types within generic
types. Emit generic parameters and requirements for anonymous contexts
as well, and deal with this in the runtime.
Scope: Regression from 4.2. Affects private generic types within private generic types.
Issue: rdar://problem/46853806
Risk: Low; small change to type metadata emission
Testing: Swift CI, two projects that triggered this particular bug
Reviewed by: @jckarter

Anonymous context descriptors were being treated as non-generic by
IRGen, which lead to problems for (file)private types within generic
types. Emit generic parameters and requirements for anonymous contexts
as well.

The runtime was mostly prepared for this, and the ABI already
accounted for it, so the runtime change is minor---it only affected
building a demangle tree from metadata.

Fixes rdar://problem/46853806.

(cherry picked from commit 4cdb26d)
@DougGregor DougGregor requested a review from a team as a code owner January 8, 2019 00:30
@DougGregor DougGregor merged commit 062ba62 into swiftlang:swift-5.0-branch-12-12-2018 Jan 8, 2019
@DougGregor DougGregor deleted the generic-anonymous-context-descriptors-5.0-12-12-2018 branch January 8, 2019 00:35
@DougGregor
Copy link
Member Author

@swift-ci please nominate

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