summaryrefslogtreecommitdiff
path: root/scripts/test/env.js
Commit message (Collapse)AuthorAgeFilesLines
* wasm2js2: optimize call_indirect and select operands (#2056)Alon Zakai2019-04-251-0/+3
| | | Don't use temp vars to reorder them unless we need to.
* wasm2js: support non-constant indexes for memory and table segments (#2055)Alon Zakai2019-04-251-0/+2
| | | Mostly what we need for dynamic linking, at least on the binaryen side.
* wasm2js: use scratch memory properly (#2033)Alon Zakai2019-04-221-2/+0
| | | | | | | This replaces all uses of __tempMemory__, the old scratch space location, with calls to function imports for scratch memory access. This lets us then implement those in a way that does not use the same heap as main memory. This avoids possible bugs with scratch memory overwriting something, or just in general that it has observable side effects, which can confuse fuzzing etc. The intrinsics are currently implemented in the glue. We could perhaps emit them inline instead (but that might limit asm.js optimizations, so I wanted to keep our options open for now - easy to change later). Also fixes some places where we used 0 as the scratch space address.
* wasm2js2 import fixes (#2031)Alon Zakai2019-04-191-0/+11
| | | | | | * Don't assume function types exist in legalize-js-interface. * Properly handle (ignore) imports in RemoveNonJSOps - do not try to recurse into them. * Run legalize-js-interface and remove-unused-module-elements in wasm2js, the first is necessary, the last is nice to have.
* Wasm2js memory fixes (#2003)Alon Zakai2019-04-121-0/+1
* I64ToI32Lowering - don't assume address 0 is a hardcoded location for scratch memory. Import __tempMemory__ for that. * RemoveNonJSOps - also use __tempMemory__. Oddly here the address was a hardcoded 1024 (perhaps where the rust program put a static global?). * Support imported ints in wasm2js, coercing them as needed. * Add "env" import support in the tests, since now we emit imports from there. * Make wasm2js tests split out multi-module tests using split_wast which is more robust and avoids emitting multiple outputs in one file (which makes no sense for ES6 modules)