diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-28 16:39:55 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-28 16:39:55 -0800 |
commit | 146eff420861aa9167861af8849dc5109b4b3b22 (patch) | |
tree | 15ba4fbe4bb62c357795e3f240c0ec93fcfb1afc /emcc | |
parent | 80bda6efdf40c0fcf823b9708c9a6e29b25ae19d (diff) |
run js opts for safe heap
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -1223,7 +1223,8 @@ try: assert not shared.Settings.PGO, 'cannot run PGO in ASM_JS mode' if shared.Settings.SAFE_HEAP and not js_opts: - logging.warning('asm.js+SAFE_HEAP requires js opts to be run to be fully effective (-O2 or above by default)') + js_opts = True + logging.warning('enabling js opts to allow SAFE_HEAP to work properly') if shared.Settings.ALLOW_MEMORY_GROWTH: logging.error('Cannot enable ALLOW_MEMORY_GROWTH with asm.js, build with -s ASM_JS=0 if you need a growable heap'); @@ -1998,12 +1999,12 @@ try: else: return 'eliminate' - js_optimizer_queue += [get_eliminate()] + if opt_level >= 2: + js_optimizer_queue += [get_eliminate()] - if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION: - js_optimizer_queue += ['aggressiveVariableElimination'] + if shared.Settings.AGGRESSIVE_VARIABLE_ELIMINATION: + js_optimizer_queue += ['aggressiveVariableElimination'] - if opt_level >= 2: js_optimizer_queue += ['simplifyExpressions'] if closure and not shared.Settings.ASM_JS: @@ -2022,13 +2023,13 @@ try: js_optimizer_queue += ['outline'] js_optimizer_extra_info['sizeToOutline'] = shared.Settings.OUTLINING_LIMIT - if (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3: + if opt_level >= 2 and (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and debug_level < 3: if shared.Settings.ASM_JS and opt_level >= 3 and shared.Settings.OUTLINING_LIMIT == 0: js_optimizer_queue += ['registerizeHarder'] else: js_optimizer_queue += ['registerize'] - if opt_level > 0: + if opt_level >= 2: if debug_level < 2 and shared.Settings.ASM_JS: js_optimizer_queue += ['minifyNames'] if debug_level == 0: js_optimizer_queue += ['minifyWhitespace'] |