diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-22 13:49:54 +0100 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-22 13:54:35 +0100 |
commit | f725733b1475788559ff1862e7007559c5d550bc (patch) | |
tree | 3641e292e2a200fc57a89add78dd384024d80ee6 | |
parent | bafab997bde417dd95b231dbc2852698223dee08 (diff) |
save only strings in jcache
-rwxr-xr-x | emscripten.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index f1f90e2c..aeef5f9a 100755 --- a/emscripten.py +++ b/emscripten.py @@ -54,7 +54,7 @@ def process_funcs(args): open(funcs_file, 'w').write(ll) out = shared.run_js(compiler, compiler_engine, [settings_file, funcs_file, 'funcs', forwarded_file] + libraries, stdout=subprocess.PIPE, cwd=path_from_root('src')) shared.try_delete(funcs_file) - return out.split('//FORWARDED_DATA:') + return out def emscript(infile, settings, outfile, libraries=[]): """Runs the emscripten LLVM-to-JS compiler. We parallelize as much as possible @@ -217,6 +217,9 @@ def emscript(infile, settings, outfile, libraries=[]): if out and DEBUG and len(chunks) > 0: print >> sys.stderr, ' saving %d funcchunks to jcache' % len(chunks) if jcache: outputs += cached_outputs # TODO: preserve order + + outputs = [output.split('//FORWARDED_DATA:') for output in outputs] + funcs_js = ''.join([output[0] for output in outputs]) for func_js, curr_forwarded_data in outputs: |