diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-26 16:49:15 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-03 14:41:29 -0700 |
commit | 8e32327cb06438518f9370406d14a7d955e85f2f (patch) | |
tree | 71823282db312203e7901e343e5bedd1f7a463dc | |
parent | bfecccd0b34d065c6779186f21584abfb1dbf306 (diff) |
do not override Runtime methods with asm methods in side modules
-rwxr-xr-x | emscripten.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 3dba10c3..3551e9c2 100755 --- a/emscripten.py +++ b/emscripten.py @@ -606,10 +606,14 @@ function setTempRet%d(value) { // EMSCRIPTEN_END_ASM (%s, %s, buffer); %s; +''' % (pre_tables + '\n'.join(function_tables_impls) + '\n' + function_tables_defs.replace('\n', '\n '), exports, the_global, sending, receiving)] + + if not settings.get('SIDE_MODULE'): + funcs_js.append(''' Runtime.stackAlloc = function(size) { return asm['stackAlloc'](size) }; Runtime.stackSave = function() { return asm['stackSave']() }; Runtime.stackRestore = function(top) { asm['stackRestore'](top) }; -''' % (pre_tables + '\n'.join(function_tables_impls) + '\n' + function_tables_defs.replace('\n', '\n '), exports, the_global, sending, receiving)] +''') # Set function table masks masks = {} |