binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

LegalizeJSInterface: Look for get/setTempRet0 as exports

Open sbc100 opened this issue 2 years ago • 2 comments

This allows emscripten to move these helper functions from JS library imports to native wasm exports.

This change continues to support getTempRet0/setTempRet0 as imports while we transition emscripten. See https://github.com/emscripten-core/emscripten/pull/17581

See https://github.com/emscripten-core/emscripten/issues/7273

sbc100 avatar Aug 05 '22 18:08 sbc100

I tested this change with the current emscripten, running all of core2 and other suites.

sbc100 avatar Aug 05 '22 23:08 sbc100

PTAL, I think this is good to land. Once it rolls in we can look at landing the emscripten side of this, followed by a tidy up here once that is in.

sbc100 avatar Aug 06 '22 02:08 sbc100

Actually I'm working on writing some tests.. not quite ready for review yet.

sbc100 avatar Aug 11 '22 20:08 sbc100

This change is less intrusive now. A new option was added that will cause the pass to use existing exports instead of imports. This will likely only ever be used by emscripten.

sbc100 avatar Aug 12 '22 00:08 sbc100