-
Notifications
You must be signed in to change notification settings - Fork 9
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
General Il traversal #22
base: main
Are you sure you want to change the base?
Conversation
I welcome nice helpers for common cases, although i wondering how often one needs to write a pass that doesn't fit this scheme (local env updates, different accumulators in different surpasses etc.) Personally I'd probably lean towards simplifying the structure of the AST so that there is less boiler plate code to write (E.g. BinOp and RelOp really don't need to be different at this point). But this is not to discourage you; if indeed it removes the boiler plate code from most passes then great! |
Merge with WebAssembly/function-references
A few more typo fixes in Explainer.md
When I started writing my own IL pass, I noticed how much boilerplate there is in the traversal. This tries to resolve the problem by creating a generic function that traverses the whole script, with hooks in the proper places. I will make a PR when I am able to succinctly express all current passes written by @nomeata, but I still wanted to show you where things are heading right now.