9 Commits

Author SHA1 Message Date
f92350d294 wasm2js: Stop emitting nan and infinity (#5391)
As noted in #4739, legacy language emitting nan and infinity
exists, with the observation that it can be removed once asm.js
is no longer used and global NaN is available.

This commit removes that asm.js-specific code accordingly.
2023-01-04 15:02:14 -08:00
c43721a1ae wasm2js: Support for flexible module import naming (#5114)
The previous code was making emscripten-specific assumptions about
imports basically all coming from the `env` module.

I can't find a way to make this backwards compatible so may do a
combined roll with the emscripten-side change:
https://github.com/emscripten-core/emscripten/pull/17806
2022-10-05 15:18:22 -07:00
d797c751df wasm2js: Don't assume that env.abort can always be impored. (#5049)
This import was being injected and then used to implement trapping.
Rather than injecting an import that doesn't exist in the original
module we instead use the existing mechanism to implement this as
an internal helper.
2022-09-16 09:33:08 -07:00
64f9732c40 wasm2js: Have instantiate function take standard import object (#5018)
Previously we were assuming asmLibraryArg which is what emscripten
passes as the `env` import object but using this method is more
flexible and should allow wasm2js to work with import that are
not all form a single object.

The slight size increase here is just temporary until emscripten
gets updated.

See https://github.com/emscripten-core/emscripten/pull/17737
2022-09-14 19:36:37 +00:00
236296d856 [wasm2js] Use native JavaScript Math.trunc (#3329) 2020-11-10 13:04:16 -08:00
040a7cc372 wasm2js: Remove global dict arguments to asmFunc (#3325) 2020-11-05 16:10:10 -08:00
f61ec303bc wasm2js: Skip heap creation in the absence of wasm memory. NFC (#3167)
Also, format the asmFunc call to make it more readable in the ES6
modules case.
2020-09-24 14:34:05 -07:00
ee00f64775 wasm2js: Support exported tables (#3152) 2020-09-21 16:39:46 -07:00
0cd48e6c19 Support empty export names in wasm2js and JS mangling in general (#2290) 2019-08-09 19:14:31 -07:00