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

Use IRBuilder in the binary reader #6614

Open
tlively opened this issue May 20, 2024 · 0 comments
Open

Use IRBuilder in the binary reader #6614

tlively opened this issue May 20, 2024 · 0 comments

Comments

@tlively
Copy link
Member

tlively commented May 20, 2024

The new wat parser is based on the IRBuilder utility, which maintains all the state necessary to turn a linear sequence of instructions and delimiters into Binaryen IR. The binary reader has its own similar functionality, so we could reduce duplication and improve the quality of the parsed IR if we had it use IRBuilder instead.

Using IRBuilder in both the text and binary parsers will also let us implement new IR building functionality just once in the future. For example, we could support lowering multivalue block input (#6407) to scratch locals just once in IRBuilder rather than having to do it separately for the text and binary parsers.

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

No branches or pull requests

1 participant