diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-03 16:49:36 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-03 16:49:36 -0500 |
commit | 132ab0f5905209c33a9c6e8615e0a6dc197cca1d (patch) | |
tree | 437e442b4b62e054a49627b4eafe250306145ba8 /emscripten.py | |
parent | baa83f6f205ed9634664ec9fb369c8984454ad32 (diff) |
do not assume fastcomp emits 'pre' table
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py index a507b0bf..f2081af7 100755 --- a/emscripten.py +++ b/emscripten.py @@ -827,6 +827,10 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, last_forwarded_json = forwarded_json = json.loads(forwarded_data) + # merge in information from llvm backend + + last_forwarded_json['Functions']['tables'] = metadata['tables'] + '''indexed_functions = set() for key in forwarded_json['Functions']['indexedFunctions'].iterkeys(): indexed_functions.add(key)''' @@ -887,8 +891,11 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None, class Counter: i = 0 j = 0 - pre_tables = last_forwarded_json['Functions']['tables']['pre'] - del last_forwarded_json['Functions']['tables']['pre'] + if 'pre' in last_forwarded_json['Functions']['tables']: + pre_tables = last_forwarded_json['Functions']['tables']['pre'] + del last_forwarded_json['Functions']['tables']['pre'] + else: + pre_tables = '' def make_table(sig, raw): i = Counter.i |