summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-12 14:39:21 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-03-12 14:39:21 -0800
commitcb24663efde2d12d94e358d63d32b1cf97c4d342 (patch)
tree51bd5a1b80f5620bfb5c7dfc04c43780d690e36d /scripts
parentf02c4903db7368a108067723e2ab66a8bc60b7b7 (diff)
downloadbinaryen-cb24663efde2d12d94e358d63d32b1cf97c4d342.tar.gz
binaryen-cb24663efde2d12d94e358d63d32b1cf97c4d342.tar.bz2
binaryen-cb24663efde2d12d94e358d63d32b1cf97c4d342.zip
update spidermonkify.py to not fix page size, which is already done now
Diffstat (limited to 'scripts')
-rw-r--r--scripts/spidermonkify.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/scripts/spidermonkify.py b/scripts/spidermonkify.py
index fb20e6dc7..6753d02e9 100644
--- a/scripts/spidermonkify.py
+++ b/scripts/spidermonkify.py
@@ -54,18 +54,12 @@ shutil.copyfile(wast_target + '.mappedGlobals', wasm_target + '.mappedGlobals')
# fix up wast
wast = open(wast_target).read()
-# memory to page sizes
-PAGE_SIZE = 64 * 1024
+# memory
memory_start = wast.find('(memory') + 1
memory_end = wast.find(')', memory_start)
-memory = wast[memory_start:memory_end]
-parts = memory.split(' ')
-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 = (wast[:memory_end + 1] +
+ ' (export "memory" memory) ' +
+ wast[memory_end + 1:])
open(wast_target, 'w').write(wast)
# convert to binary using spidermonkey