aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-26 17:54:03 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-09-03 14:41:29 -0700
commitaa1c42a298a568f2910cb0a184824763016ce64f (patch)
treedc018ee0c1216ea6a7a2b268b84d3facc30047ac /emscripten.py
parent8e32327cb06438518f9370406d14a7d955e85f2f (diff)
use function table offset for F_BASE_* in shared modules
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py
index 3551e9c2..c3e51c96 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -634,7 +634,7 @@ Runtime.stackRestore = function(top) { asm['stackRestore'](top) };
asm.maxFunctionIndex = %d;
''' % max_mask)
for sig in last_forwarded_json['Functions']['tables'].iterkeys():
- funcs_js.append(' var F_BASE_%s = 0;\n' % sig)
+ funcs_js.append(' var F_BASE_%s = %s;\n' % (sig, 'FUNCTION_TABLE_OFFSET' if settings.get('SIDE_MODULE') else '0'))
else:
function_tables_defs = '\n'.join([table for table in last_forwarded_json['Functions']['tables'].itervalues()])