Calling binaryen.getExpressionInfo(exprRef) with the reference of the body where it's only instruction is unreachable causes the following JS error:
TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at A.getExpressionInfo (file:///Users/austin/dev/fallow64-binaryen-js-issue-example/node_modules/binaryen/index.js:8:4495)
at main (/Users/austin/dev/fallow64-binaryen-js-issue-example/src/main.ts:28:38)
at /Users/austin/dev/fallow64-binaryen-js-issue-example/src/main.ts:34:1
at async Function.import (/Users/austin/dev/fallow64-binaryen-js-issue-example/node_modules/jiti/dist/jiti.cjs:1:202945)
at async file:///Users/austin/dev/fallow64-binaryen-js-issue-example/node_modules/jiti/lib/jiti-cli.mjs:31:1
I'm unfamiliar with the codebase so I'm not too sure if it's the expression information resolving that's causing the issue, the function parser, or something else. Seems to be a regression due to 1.124.0. Changing the dependency in package.json of the example to ^123.0.0 resolves the issue.
Example repo: https://github.com/fallow64/fallow64-binaryen-js-issue-example
Tested platforms: MacOS, Windows
Thanks :)
Calling
binaryen.getExpressionInfo(exprRef)with the reference of the body where it's only instruction isunreachablecauses the following JS error:I'm unfamiliar with the codebase so I'm not too sure if it's the expression information resolving that's causing the issue, the function parser, or something else. Seems to be a regression due to
1.124.0. Changing the dependency inpackage.jsonof the example to^123.0.0resolves the issue.Example repo: https://github.com/fallow64/fallow64-binaryen-js-issue-example
Tested platforms: MacOS, Windows
Thanks :)