refactor[venom]: make venom repr parseable#4402
Merged
charles-cooper merged 19 commits intovyperlang:masterfrom Dec 19, 2024
Merged
refactor[venom]: make venom repr parseable#4402charles-cooper merged 19 commits intovyperlang:masterfrom
charles-cooper merged 19 commits intovyperlang:masterfrom
Conversation
make the repr implementations for venom data structures (IRContext, IRFunction, IRBasicBlock) emit strings which will round-trip through the parser. remove a dead function (`str_short()`)
- ensure instructions are terminated with newline (otherwise they can continue parsing next line) - allow signed ints for IRLiteral
HodanPlodky
reviewed
Dec 18, 2024
| %import common.WS | ||
| %import common.INT | ||
| %import common.SIGNED_INT | ||
| %import common.ESCAPED_STRING |
Collaborator
There was a problem hiding this comment.
Just wondering if it would be better to just change up some of the labels instead of parsing escaped string (I dont know how many cases are there I stumbled so far on case with the space which could be replaced by underscore)?
Member
Author
There was a problem hiding this comment.
i could do it both ways honestly, but this seemed nicer for debugging (you can imagine the frontend generating a sentence or description of where it came from for a label)
harkal
approved these changes
Dec 18, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What I did
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture