-
Notifications
You must be signed in to change notification settings - Fork 758
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
Use Names::getValidNameGivenExisting in binary reading #6793
Conversation
This isn't NFC as there are minor observable differences in the names compared to before, but the new names should be just as good. Added a test for collisions with the new naming scheme that prefers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's a shocking improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add this as a lit test under lit/binary instead? Although it looks a like there is already an updated lit test, so maybe it isn't necessary to add a new test at all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests check slightly different things, different possible name overlaps, with '.', '_', '$', so I think we need all three. I converted the non-lit ones to lit.
WebAssembly/binaryen#6793 alters names of functions, which two metadce tests turn out to be sensitive to. (It changes the suffixes we use to deduplicate identical names.)
This re-enables the tests and updates the outputs. The suffixes vanish here as WebAssembly/binaryen#6793 replaces .1 with _1, and we have code in this test to ignore such suffixes (as LLVM adds them, and we strip hem to make the output less likely to change frequently).
We had a TODO to use it once Names was optimized, which it has been.
The Names version is also far faster. When building
https://github.com/JetBrains/kotlinconf-app it saves 70 seconds(!).