diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-22 09:28:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-22 09:28:23 -0700 |
commit | b99d668ead5c6a6a4891ec58b5a53e80ea9f5705 (patch) | |
tree | cd6ae2d7dfa5164a1b71f5445f5882a48c053a90 /scripts/test/env.js | |
parent | db14d0477f2715e3071687f42b77d8712477d83e (diff) | |
download | binaryen-b99d668ead5c6a6a4891ec58b5a53e80ea9f5705.tar.gz binaryen-b99d668ead5c6a6a4891ec58b5a53e80ea9f5705.tar.bz2 binaryen-b99d668ead5c6a6a4891ec58b5a53e80ea9f5705.zip |
wasm2js: use scratch memory properly (#2033)
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.
Diffstat (limited to 'scripts/test/env.js')
-rw-r--r-- | scripts/test/env.js | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/test/env.js b/scripts/test/env.js index 35b2d38c8..44e6035de 100644 --- a/scripts/test/env.js +++ b/scripts/test/env.js @@ -8,5 +8,3 @@ export function getTempRet0() { return tempRet0; } -export const __tempMemory__ = 0; - |