diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-11 21:18:37 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-11 21:18:37 -0700 |
commit | 9e7a712c6b6186792f186ed6bd6d6af31d36a434 (patch) | |
tree | ed0b51d1f165dc80278aedf9f3f768fe303aff15 /emscripten.py | |
parent | fd301b105745a855e4cb231e217e8acf40df1858 (diff) |
infrastructure for supporting exceptions in asm.js, by going through invoke_* calls
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 502e951c..996e5cc3 100755 --- a/emscripten.py +++ b/emscripten.py @@ -414,12 +414,13 @@ var i64Math_modulo = function(a, b, c, d, e) { i64Math.modulo(a, b, c, d, e) }; } ''' % (sig, ',' if len(sig) > 1 else '', args, arg_coercions, ret)) args = ','.join(['a' + str(i) for i in range(1, len(sig))]) + args = 'index' + (',' if args else '') + args asm_setup += ''' function invoke_%s(%s) { try { %sModule.dynCall_%s(%s); } catch(e) { - Module.setThrew(1); + asm.setThrew(1); } } ''' % (sig, args, 'return ' if sig[0] != 'v' else '', sig, args) |