binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

Further enhancements to ExpressionRunner

Open dcodeIO opened this issue 5 years ago • 8 comments

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?

dcodeIO avatar Apr 22 '20 04:04 dcodeIO