binaryen
binaryen copied to clipboard
Further enhancements to ExpressionRunner
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?