diff options
-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) |