From 8e32327cb06438518f9370406d14a7d955e85f2f Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 26 Aug 2013 16:49:15 -0700 Subject: [PATCH] do not override Runtime methods with asm methods in side modules --- emscripten.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emscripten.py b/emscripten.py index 3dba10c36..3551e9c22 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 = {}