aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-11 21:57:15 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-11 21:57:15 -0700
commit8cb83003709aa90a3410b6352552342ec97d5116 (patch)
tree1b8cb216f7f9bc3b2bba5799e1d8261b28b6513b /emscripten.py
parent5bb74d2c5ed57a7b52e1a3d01404edfb7a9945ea (diff)
experimental toFloat32 option
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/emscripten.py b/emscripten.py
index 217fd6d5..1b1284c7 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -423,6 +423,8 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
math_envs = ['Math.min'] # TODO: move min to maths
asm_setup += '\n'.join(['var %s = %s;' % (f.replace('.', '_'), f) for f in math_envs])
+ if settings['TO_FLOAT32']: maths += ['Math.toFloat32']
+
basic_funcs = ['abort', 'assert', 'asmPrintInt', 'asmPrintFloat'] + [m.replace('.', '_') for m in math_envs]
if settings['RESERVED_FUNCTION_POINTERS'] > 0: basic_funcs.append('jsCall')
if settings['SAFE_HEAP']: basic_funcs += ['SAFE_HEAP_LOAD', 'SAFE_HEAP_STORE', 'SAFE_HEAP_CLEAR']