Skip to content

[4.2 2018-06-11] [Mangling] Mangle more standard substitutions #17358

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 Jun 20, 2018

Explanation: Use more of the "standard substitution" mangling space (S<character>), for commonly-used standard library types, like Dictionary (which goes from s10DictionaryV to SD), including standard substitution manglings for protocols (like Collection). This results in a code-savings win (~470k for the standard library itself in development builds).
Scope: Affects the mangled names in all Swift projects.
Risk: Low; mangling/demangling changes like this are straightforward and get heavily tested simply by building code.
Testing: Compiler regression tests
Reviewer: @jrose-apple , @jckarter
SR / Radar: rdar://problem/40468532

…ypes.

Since the mangling scheme and set of standard library types is effectively
fixed now, introduce known mangling substitutions for a number of new
standard library types, filling out the S[A-Za-z] space.

Reduces standard library binary size by ~195k.

(cherry picked from commit 7952a19)
Protocol name mangling didn’t always go through a path that allowed the use
of standard substitutions. Enable standard substitutions for protocol name
manglings where they make sense.

Removes ~277k from the standard library binary size.

(cherry picked from commit f232af5)
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@swiftlang swiftlang deleted a comment from shahmishal Jun 21, 2018
@najacque
Copy link
Contributor

@swift-ci please nominate

@DougGregor DougGregor merged commit 9c2c894 into swiftlang:swift-4.2-branch-06-11-2018 Jun 21, 2018
@DougGregor DougGregor deleted the mangle-more-standard-substitutions-4.2-06-11-2018 branch June 21, 2018 06:22
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