diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-10 15:52:06 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-10 15:52:06 -0800 |
commit | 624ef44bb35ada422bcda1a259cb8b7721f3d378 (patch) | |
tree | 8450d47f2943b6c7c5f429ce4ae5fdbc12508aae | |
parent | 1b6170daafcbf58d18b6092017e7b6ca5e2cd8c0 (diff) |
add Math.abs to default asm imports
-rwxr-xr-x | emscripten.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 6b990bd3..1e38319d 100755 --- a/emscripten.py +++ b/emscripten.py @@ -305,7 +305,7 @@ def emscript(infile, settings, outfile, libraries=[]): return 'function %s(%s) { %s abort(%d); %s };\n' % (bad, params, coercions, i, ret) + raw.replace('[0,', '[' + bad + ',').replace(',0,', ',' + bad + ',').replace(',0,', ',' + bad + ',').replace(',0]', ',' + bad + ']').replace(',0]', ',' + bad + ']') function_tables_defs = '\n'.join([make_table(sig, raw) for sig, raw in last_forwarded_json['Functions']['tables'].iteritems()]) - maths = ['Runtime.bitshift64', 'Math.floor', 'Math.min'] + maths = ['Runtime.bitshift64', 'Math.floor', 'Math.min', 'Math.abs'] if settings['USE_MATH_IMUL']: maths += ['Math.imul'] asm_setup = '\n'.join(['var %s = %s;' % (f.replace('.', '_'), f) for f in maths]) |