WebAssembly / WebAssembly/binaryen
[Outlining] Consider replacing state enum with a single `IRBuilder* currBuilder` field
Open
@ashleynh is already working on this.
Since Nov 13, 2023.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
Just realized that it would be possible to replace this state enum with a single `IRBuilder* currBuilder` field that is either `&outlinedBuilder`, `&existingBuilder`, or `nullptr`. `getCurrentState` would simply set `currBuilder` to the correct value and we wouldn't need to worry about separately computing the right `IRBuilder` to use.
Up to you whether you want to do this, since the explicit state enum is slightly more self-documenting.
Originally posted by @tlively in https://github.com/WebAssembly/binaryen/pull/6110#discussion_r1390595556
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.