Skip to content
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

[Parser] Parse data segments #5373

Merged
merged 4 commits into from Jan 3, 2023
Merged

[Parser] Parse data segments #5373

merged 4 commits into from Jan 3, 2023

Conversation

tlively
Copy link
Member

@tlively tlively commented Dec 21, 2022

Parse active and passive data segments, including all their variations and
abbreviations as well as data segments declared inline in memory declarations.
Switch to parsing data strings, memory limits, and memory types during the
ParseDecls phase so that the inline data segments can be completely parsed
during that phase and never revisited. Parsing the inline data segments in a
later phase would not work because they would be incorrectly inserted at the end
of the data segment index space.

Also update the printer to print a memory use on active data segments that are
initialized in a non-default memory.

For each definition in a module, record that definition's index in the relevant
index space. Previously the index was inferred from its position in a list of
module definitions, but that scheme does not scale to data segments defined
inline inside memory definitions because these data segments occupy a slot in
the data segment index space but do not have their own independent definitions.
@tlively
Copy link
Member Author

tlively commented Dec 21, 2022

Parse active and passive data segments, including all their variations and
abbreviations as well as data segments declared inline in memory declarations.
Switch to parsing data strings, memory limits, and memory types during the
ParseDecls phase so that the inline data segments can be completely parsed
during that phase and never revisited. Parsing the inline data segments in a
later phase would not work because they would be incorrectly inserted at the end
of the data segment index space.

Also update the printer to print a memory use on active data segments that are
initialized in a non-default memory.
@tlively
Copy link
Member Author

tlively commented Jan 3, 2023

✅ This pull request merged successfully as part of a Graphite job
Stack job ID: YT2CYTWYcz4xraCFUPzB.
See details on graphite.dev

Base automatically changed from parser-track-indices to main January 3, 2023 19:37
@tlively tlively merged commit 657431c into main Jan 3, 2023
@tlively tlively deleted the parser-data-segments branch January 3, 2023 20:46
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.

None yet

2 participants