From bcfa7289f5df48f40e59542f66c0504cfae3a19b Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 21 Apr 2016 16:04:52 -0700 Subject: fix spidermonkify --- scripts/spidermonkify.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/spidermonkify.py b/scripts/spidermonkify.py index 623015fde..33480d589 100644 --- a/scripts/spidermonkify.py +++ b/scripts/spidermonkify.py @@ -51,11 +51,14 @@ js = js.replace("'" + base_wast_target + "'", "'" + base_wasm_target + "'") open(js_target, 'w').write(js) shutil.copyfile(wast_target + '.mappedGlobals', wasm_target + '.mappedGlobals') -# convert to binary using spidermonkey, something like -#mozjs -e 'os.file.writeTypedArrayToFile("moz.wasm", -#new Uint8Array(wasmTextToBinary(os.file.readFile("test/hello_world.wast"))))' -#investigate with -#>>> map(chr, map(ord, open('moz.wasm').read())) +# convert to binary using spidermonkey +''' +using something like +mozjs -e 'os.file.writeTypedArrayToFile("moz.wasm", +new Uint8Array(wasmTextToBinary(os.file.readFile("test/hello_world.wast"))))' +investigate with +>>> map(chr, map(ord, open('moz.wasm').read())) +''' subprocess.check_call( emscripten.shared.SPIDERMONKEY_ENGINE + ['-e', 'os.file.writeTypedArrayToFile("' + wasm_target + -- cgit v1.2.3