WebAssembly / WebAssembly/binaryen
Further enhancements to ExpressionRunner
Nobody has claimed this yet.
- Dominant language
- WebAssembly
- Stars
- 8.6k
- Forks
- 885
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 69
Description
I've meanwhile integrated the new ExpressionRunner (https://github.com/WebAssembly/binaryen/pull/2702) and it does what I've been hoping for, except for one edge case:
The expression runner allows to evaluate just the value of an expression, but if we have code like
(block
(drop
(local.get $0)
)
(i32.const 0)
)
and there is no known value for the local.get, it considers the expression a NONCONSTANT_FLOW and stops, instead of recognizing that the local.get is being dropped anyway, returning i32.const(0). Have looked at the code again, but supporting this seems like a non-trivial change. Any suggestions?
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.
Research direction
Start with the ExpressionRunner implementation and its existing tests, focusing on how unknown local.get expressions are classified inside dropped expressions. Reproduce the WAT example and trace the NONCONSTANT_FLOW result; done means the dropped unknown value no longer prevents the surrounding expression from evaluating to i32.const(0), with regression coverage for this case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100