diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-27 20:07:07 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-27 20:07:07 -0700 |
commit | ed88bc7051a61e05c6e85e792d56513826722d2e (patch) | |
tree | d40113a39ebe21626cb193e1a5652f621052e942 /emcc | |
parent | b1989519a9e66a8c2f5b2174a2eadb53bb8f9f56 (diff) |
memory growth must be manually enabled with ALLOW_MEMORY_GROWTH, in which case the eliminator runs in safe mode
Diffstat (limited to 'emcc')
-rwxr-xr-x | emcc | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1045,11 +1045,14 @@ try: if shared.Settings.RELOOP: js_optimizer_queue += ['hoistMultiples', 'loopOptimizer'] - js_optimizer_queue += ['eliminate'] + def get_eliminate(): + return 'eliminate' if not shared.Settings.ALLOW_MEMORY_GROWTH else 'eliminateMemSafe' + + js_optimizer_queue += [get_eliminate()] js_optimizer_queue += ['simplifyExpressionsPre'] if shared.Settings.RELOOP: - js_optimizer_queue += ['optimizeShiftsAggressive', 'eliminate'] # aggressive shifts optimization requires loops, it breaks on switches + js_optimizer_queue += ['optimizeShiftsAggressive', get_eliminate()] # aggressive shifts optimization requires loops, it breaks on switches if closure: flush_js_optimizer_queue() |