aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-07 15:10:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-07 15:10:36 -0800
commit92a1c1e242fa6b49573a1f92ac5155400f81cd2f (patch)
tree6f341d61f34df02171dafa97308c40e6829155f7 /emscripten.py
parent73eff601dabda042afcd9d80b4b290d7ca6858fc (diff)
forward in Math_* from Math.* and correct the compiled code to align to that
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py
index 64e2bde4..ceb81e62 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -289,9 +289,9 @@ def emscript(infile, settings, outfile, libraries=[]):
function_tables_defs = '\n'.join([table for table in last_forwarded_json['Functions']['tables'].itervalues()])
if settings.get('ASM_JS'):
- asm_setup = 'var Runtime_bitshift64 = Runtime.bitshift64;'
+ asm_setup = '\n'.join(['var %s = %s;' % (f.replace('.', '_'), f) for f in ['Runtime.bitshift64', 'Math.floor', 'Math.min']])
fundamentals = ['buffer', 'Int8Array', 'Int16Array', 'Int32Array', 'Uint8Array', 'Uint16Array', 'Uint32Array', 'Float32Array', 'Float64Array']
- basics = ['abort', 'assert', 'STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT', 'Runtime_bitshift64']
+ basics = ['abort', 'assert', 'STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT', 'Runtime_bitshift64', 'Math_floor', 'Math_min']
if not settings['NAMED_GLOBALS']: basics += ['GLOBAL_BASE']
if forwarded_json['Types']['preciseI64MathUsed']:
basics += ['i64Math_' + op for op in ['add', 'subtract', 'multiply', 'divide', 'modulo']]