WebAssembly / WebAssembly/binaryen

[Outlining] Consider replacing state enum with a single `IRBuilder* currBuilder` field

Open
#6,113 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.