aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py
index a1b6a606..e90cce2a 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -744,6 +744,8 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
backend_args += ['-emscripten-precise-f32']
if settings['WARN_UNALIGNED']:
backend_args += ['-emscripten-warn-unaligned']
+ if settings['RESERVED_FUNCTION_POINTERS'] > 0:
+ backend_args += ['-emscripten-reserved-function-pointers=%d' % settings['RESERVED_FUNCTION_POINTERS']]
if DEBUG:
logging.debug('emscript: llvm backend: ' + ' '.join(backend_args))
t = time.time()
@@ -932,7 +934,9 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
end = raw.rindex(']')
body = raw[start+1:end].split(',')
for j in range(settings['RESERVED_FUNCTION_POINTERS']):
- body[settings['FUNCTION_POINTER_ALIGNMENT'] * (1 + j)] = 'jsCall_%s_%s' % (sig, j)
+ curr = 'jsCall_%s_%s' % (sig, j)
+ body[settings['FUNCTION_POINTER_ALIGNMENT'] * (1 + j)] = curr
+ implemented_functions.add(curr)
Counter.j = 0
def fix_item(item):
Counter.j += 1