[Don't merge] docs: description of new mangling scheme, version 2 #5433
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a proposal for a new mangling scheme. It's still draft and probably the grammar contains several bugs. But it should give an idea how it could look like.
These are the main changes:
This is the biggest change.
It will help to get more common prefixes in the mangled names to optimize the trie in the mach-o object files.
The length of the mangled names will mostly stay the same but the order of 'operands' inside the mangling is more or less reversed.
This change also required to use different 'operator' characters in some cases.
Similar to the S-substitutions, but finer grained. See section 'Identifiers'.
Reduces the size of mangled names in general.
A more efficient way to mangle multiple S-substitutions.
Reduces the size of mangled names with lots of substitutions, e.g. specialized functions.
(on John's request)
Because it's basically a completely new mangling scheme.