WebAssembly / WebAssembly/binaryen

`BrOn` does not support carrying additional values

Open
#5,721 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

The spec allows all branches to carry an arbitrary number of values to their destination labels (as long as the destination label has a result type that expects those values). We represent this with an Expression* values field in the Break class, but the BrOn class has no such field and does not support carrying any values except the inspected reference. We should fix this by adding an Expression* values field to BrOn as well.

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.

Research direction

Locate the BrOn and Break class definitions and compare how their Expression* values fields are represented and propagated. Check the WebAssembly specification's branch value rules, then verify that BrOn can carry arbitrary values accepted by the destination label's result type.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.