aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/emscripten.py b/emscripten.py
index fcc76902..2ceb5e13 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -328,6 +328,7 @@ def emscript(infile, settings, outfile, libraries=[]):
math_envs = ['Runtime.bitshift64', 'Math.min'] # TODO: move min to maths
asm_setup = '\n'.join(['var %s = %s;' % (f.replace('.', '_'), f) for f in math_envs])
basic_funcs = ['abort', 'assert', 'asmPrintInt', 'asmPrintFloat', 'copyTempDouble', 'copyTempFloat'] + [m.replace('.', '_') for m in math_envs]
+ if settings['SAFE_HEAP']: basic_funcs += ['SAFE_HEAP_LOAD', 'SAFE_HEAP_STORE', 'SAFE_HEAP_CLEAR']
basic_vars = ['STACKTOP', 'STACK_MAX', 'tempDoublePtr', 'ABORT']
basic_float_vars = ['NaN', 'Infinity']
if forwarded_json['Types']['preciseI64MathUsed']:
@@ -394,11 +395,11 @@ var i64Math_modulo = function(a, b, c, d, e) { i64Math.modulo(a, b, c, d, e) };
# finalize
funcs_js = '''
%s
-function asmPrintInt(x) {
- Module.print('int ' + x);// + ' ' + new Error().stack);
+function asmPrintInt(x, y) {
+ Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);
}
-function asmPrintFloat(x) {
- Module.print('float ' + x);// + ' ' + new Error().stack);
+function asmPrintFloat(x, y) {
+ Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);
}
var asm = (function(global, env, buffer) {
'use asm';