diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-17 18:14:59 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-17 18:14:59 -0800 |
commit | 722a1704537f5407dfda7d3821c608c3f62287c7 (patch) | |
tree | f8819b87a2f25ffc37b9477ae357cef12d1b3c91 /emscripten.py | |
parent | 775bd44ac40f4546fb912dcdf21c7a7f6e880d25 (diff) |
support reserved function pointers in fastcomp
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 6 |
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 |