only minify globals when relooping

This commit is contained in:
Alon Zakai 2013-06-22 15:32:03 -07:00
Родитель 202461abe3
Коммит 61b60b7f13
2 изменённых файлов: 2 добавлений и 2 удалений

2
emcc
Просмотреть файл

@ -1553,7 +1553,7 @@ try:
js_optimizer_queue += ['registerize']
if opt_level > 0:
if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyGlobals']
if debug_level < 2 and shared.Settings.ASM_JS and shared.Settings.RELOOP: js_optimizer_queue += ['minifyGlobals']
if debug_level == 0: js_optimizer_queue += ['minifyWhitespace']
if closure and shared.Settings.ASM_JS:

Просмотреть файл

@ -131,7 +131,7 @@ def run_on_js(filename, passes, js_engine, jcache):
end_funcs = js.rfind(end_funcs_marker)
#assert (start_funcs >= 0) == (end_funcs >= 0) == (not not suffix)
minify_globals = 'minifyGlobals' in passes
minify_globals = 'minifyGlobals' in passes and 'registerize' in passes and 'asm' in passes
if minify_globals:
passes = filter(lambda p: p != 'minifyGlobals', passes) # we will run it manually
start_asm_marker = '// EMSCRIPTEN_START_ASM\n'