summaryrefslogtreecommitdiff
path: root/scripts/spidermonkify.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-05 16:57:40 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-03-05 16:57:40 -0800
commit198ddd04e5c464839448fdfa9fc5dcf0faac13c6 (patch)
tree59f7e19b88d9017c75a3ef9797f33bd63a2e1929 /scripts/spidermonkify.py
parentd1b8d2fc754aca8e4313e28d6440d0ebe958e804 (diff)
downloadbinaryen-198ddd04e5c464839448fdfa9fc5dcf0faac13c6.tar.gz
binaryen-198ddd04e5c464839448fdfa9fc5dcf0faac13c6.tar.bz2
binaryen-198ddd04e5c464839448fdfa9fc5dcf0faac13c6.zip
more python fixes
Diffstat (limited to 'scripts/spidermonkify.py')
-rw-r--r--scripts/spidermonkify.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/spidermonkify.py b/scripts/spidermonkify.py
index 992e7d48d..bca6458f7 100644
--- a/scripts/spidermonkify.py
+++ b/scripts/spidermonkify.py
@@ -59,12 +59,12 @@ parts[1] = str(int(math.ceil(float(parts[1]) / PAGE_SIZE)))
if len(parts) == 3:
parts[2] = str(int(math.ceil(float(parts[2]) / PAGE_SIZE)))
wast = wast[:memory_start] + ' '.join(parts) + \
- wast[memory_end:memory_end + 1] + \
- ' (export "memory" memory) ' + wast[memory_end + 1:]
+ wast[memory_end:memory_end + 1] + \
+ ' (export "memory" memory) ' + wast[memory_end + 1:]
open(wast_target, 'w').write(wast)
# convert to binary using spidermonkey
-subprocess.check_call(emscripten.shared.SPIDERMONKEY_ENGINE + ['-e',
- 'os.file.writeTypedArrayToFile("%s", new Uint8Array(wasmTextToBinary(os.file.readFile("%s"))))' % (wasm_target, wast_target)
-])
-
+subprocess.check_call(emscripten.shared.SPIDERMONKEY_ENGINE +
+ ['-e', 'os.file.writeTypedArrayToFile("' + wasm_target + \
+ '", new Uint8Array(wasmTextToBinary(os.file.readFile("' + \
+ wast_target + '"))))'])