From b99d668ead5c6a6a4891ec58b5a53e80ea9f5705 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 22 Apr 2019 09:28:23 -0700 Subject: 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. --- scripts/test/env.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'scripts/test') 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; - -- cgit v1.2.3