diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-09-14 14:44:56 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-09-14 14:57:36 -0700 |
commit | 147bc5e8b13ee6659b6a259a29400c53c537fb1c (patch) | |
tree | 50df90c9b6165377c68a05afcccdfaf5e25f3252 | |
parent | e9cd8e2b1da682597b5ae84764f4149e4654b6d6 (diff) |
dynamically determine relooper heap size using RELOOPER_BUFFER_SIZE1.5.9
-rw-r--r-- | src/compiler.js | 1 | ||||
-rw-r--r-- | tools/shared.py | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler.js b/src/compiler.js index 0baec95e..f2b0dcbd 100644 --- a/src/compiler.js +++ b/src/compiler.js @@ -213,6 +213,7 @@ load('intertyper.js'); load('analyzer.js'); load('jsifier.js'); if (RELOOP) { + RelooperModule = { TOTAL_MEMORY: ceilPowerOfTwo(2*RELOOPER_BUFFER_SIZE) }; load(RELOOPER); assert(typeof Relooper != 'undefined'); } diff --git a/tools/shared.py b/tools/shared.py index 45551fec..a07bdeaf 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -304,7 +304,7 @@ def find_temp_directory(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.5.8' +EMSCRIPTEN_VERSION = '1.5.9' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT @@ -1418,17 +1418,16 @@ class Building: Building.emcc(os.path.join('relooper', 'Relooper.cpp'), ['-I' + os.path.join('relooper'), '--post-js', os.path.join('relooper', 'emscripten', 'glue.js'), '--memory-init-file', '0', - '-s', 'TOTAL_MEMORY=67108864', '-s', 'EXPORTED_FUNCTIONS=["_rl_set_output_buffer","_rl_make_output_buffer","_rl_new_block","_rl_delete_block","_rl_block_add_branch_to","_rl_new_relooper","_rl_delete_relooper","_rl_relooper_add_block","_rl_relooper_calculate","_rl_relooper_render", "_rl_set_asm_js_mode"]', '-s', 'DEFAULT_LIBRARY_FUNCS_TO_INCLUDE=["memcpy", "memset", "malloc", "free", "puts"]', '-s', 'RELOOPER="' + relooper + '"', '-O' + str(opt_level), '--closure', '0'], raw) f = open(relooper, 'w') f.write("// Relooper, (C) 2012 Alon Zakai, MIT license, https://github.com/kripken/Relooper\n") - f.write("var Relooper = (function() {\n") + f.write("var Relooper = (function(Module) {\n") f.write(open(raw).read()) f.write('\n return Module.Relooper;\n') - f.write('})();\n') + f.write('})(RelooperModule);\n') f.close() # bootstrap phase 1: generate unrelooped relooper, for which we do not need a relooper (so we cannot recurse infinitely in this function) |