Skip to content

[IRGen] Fix issues impacting the mangled name <-> roundtrip verification #19958

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

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Oct 19, 2018

Introduce two small fixes that address problems discovered by mangle name <-> metadata roundtrip verification in the runtime:

  • IRGen for the JIT: register Objective-C classes/categories after other type metadata, because the registration might need to lookup type metadata

  • IRGen for generic requirements: we were improperly encoding the root generic parameter for associated type requirements, meaning any requirement based on generic parameter with a flat index greater than 0 would be incorrectly interpreted. I suspect we have conditional-conformances failures due to this.

…ata.

The instantiation of an Objective-C class or definition of an Objective-C
category can depend (at runtime) on Swift metadata, which is triggered
(only) by mangled name round-trip verification. Teach the JIT to call
the registration functions for Objective-C classes and categories
after we’ve called all of the metadata registration functions.
…ype reference.

The root generic parameter of an associated type reference in a generic requirement
is not shifted by one.
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor changed the title Demangle to metadata round fixes n [IRGen] Fix issues impacting the mangled name <-> roundtrip verification Oct 19, 2018
@DougGregor DougGregor merged commit 281ad7e into swiftlang:master Oct 20, 2018
@DougGregor DougGregor deleted the demangle-to-metadata-round-fixes-N branch October 20, 2018 04:14
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.

1 participant