Skip to content

Add ExistentialToGeneric mangling and demangling code #16603

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 1 commit into from
May 15, 2018

Conversation

rajbarik
Copy link
Contributor

Add a new mangler/demangler option 'e' for ExistentialToGeneric needed for
#13991

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also update docs/ABI/Mangling.rst

if (kindValue &
unsigned(
FunctionSigSpecializationParamKind::ExistentialToGeneric)) {
Buffer << 'e';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems weird that this is an if/else if construct that duplicates some of the cases here. Can you instead redo this as a series of independent ifs instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow. The idea here is that we allow "ARG-SPEC-KIND ::= 'e' 'D'? 'G'? 'X'? ---Generic argument, with optional dead, owned=>guaranteed or exploded-specifier". Please note the upper case and lower case. Let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. It seems strange that the first letter is lower case and the rest are upper case, for each of the different argument kinds. But I guess that’s what we have today already.

@rajbarik
Copy link
Contributor Author

@eeckstein please see the updated doc

@eeckstein
Copy link
Contributor

Thanks, lgtm!

@slavapestov
Copy link
Contributor

@swift-ci Please smoke test

@slavapestov slavapestov merged commit 1846b5c into swiftlang:master May 15, 2018
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.

3 participants