-
Notifications
You must be signed in to change notification settings - Fork 735
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
[NFC] Walk module to update names in binary parser #6959
Open
tlively
wants to merge
9
commits into
main
Choose a base branch
from
binary-parser-refactor-name-fixup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Sep 19, 2024
-
[NFC-ish] Eagerly create Functions in binary parser
In preparation for using IRBuilder in the binary parser, eagerly create Functions when parsing the function section so that they are already created once we parse the code section. IRBuilder will require the functions to exist when parsing calls so it can figure out what type each call should have, even when there is a call to a function whose body has not been parsed yet. NFC except that some error messages change to include the new empty functions.
Configuration menu - View commit details
-
Copy full SHA for 8543f16 - Browse repository at this point
Copy the full SHA 8543f16View commit details -
[NFC] Eagerly create segments when parsing datacount
The purpose of the datacount section is to pre-declare how many data segments there will be so that engines can allocate space for them and not have to back patch subsequent instructions in the code section that refer to them. Once we use IRBuilder in the binary parser, we will have to have the data segments available by the time we parse instructions that use them, so eagerly construct the data segments when parsing the datacount section.
Configuration menu - View commit details
-
Copy full SHA for b83bec4 - Browse repository at this point
Copy the full SHA b83bec4View commit details -
[NFC] Walk module to update names in binary parser
The binary parser generally does not know the final names of module elements when it parses them, or even when it parses instructions that refer to them, since the name section comes at the end of a binary. The parser previously kept a list of pointers to locations where each module element's name would have to be used, then it patched those locations after parsing the names section to discover the final names. When the binary parser starts using IRBuilder, the parsed expressions will be constructed and managed by IRBuilder rather than by the parser itself. This means that the parser will no longer be able to collect pointers to places where module element names are used; it won't have access to the instructions at all. Since the strategy of collecting locations to patch will no longer work, switch to a strategy of traversing the module to find and update names instead. This is generally less efficient because the locations have to be found before they can be updated, but on the other hand it only happens when preserving debug info and it is parallelizable anyway.
Configuration menu - View commit details
-
Copy full SHA for a124292 - Browse repository at this point
Copy the full SHA a124292View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f4ca9f - Browse repository at this point
Copy the full SHA 8f4ca9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d8eb13 - Browse repository at this point
Copy the full SHA 8d8eb13View commit details -
Configuration menu - View commit details
-
Copy full SHA for 945a807 - Browse repository at this point
Copy the full SHA 945a807View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d0deb1 - Browse repository at this point
Copy the full SHA 4d0deb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 70585fc - Browse repository at this point
Copy the full SHA 70585fcView commit details
Commits on Sep 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 098bd4f - Browse repository at this point
Copy the full SHA 098bd4fView commit details
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.