From cb24663efde2d12d94e358d63d32b1cf97c4d342 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 12 Mar 2016 14:39:21 -0800 Subject: update spidermonkify.py to not fix page size, which is already done now --- scripts/spidermonkify.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'scripts/spidermonkify.py') 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 -- cgit v1.2.3 From f1702697bab8f8ab40428f40ac809c9d0dd43118 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Sat, 12 Mar 2016 16:45:17 -0800 Subject: python fix --- scripts/spidermonkify.py | 1 - 1 file changed, 1 deletion(-) (limited to 'scripts/spidermonkify.py') diff --git a/scripts/spidermonkify.py b/scripts/spidermonkify.py index 6753d02e9..1632c20fd 100644 --- a/scripts/spidermonkify.py +++ b/scripts/spidermonkify.py @@ -21,7 +21,6 @@ get rid of these ASAP. This is meant to be run using BINARYEN_SCRIPTS in emcc, and not standalone. ''' -import math import os import shutil import subprocess -- cgit v1.2.3