summaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-08 16:41:44 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-08 16:43:52 -0800
commit78dbafb289e222550abda6b53e7099352a599804 (patch)
treebac704182dd01dc3d78bf0f1ca6064f78b1d7786 /emcc
parent0779c55c28f17d796f3f13962cfcac954e6cef59 (diff)
keep a coercion right on top of heap accesses in asm mode
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc9
1 files changed, 7 insertions, 2 deletions
diff --git a/emcc b/emcc
index 7c971b71..9483ef64 100755
--- a/emcc
+++ b/emcc
@@ -1186,9 +1186,14 @@ try:
else:
return 'eliminate'
- js_optimizer_queue += [get_eliminate()]
+ def get_simplify_pre():
+ if shared.Settings.ASM_JS:
+ return 'simplifyExpressionsPreAsm'
+ else:
+ return 'simplifyExpressionsPre'
+
+ js_optimizer_queue += [get_eliminate(), get_simplify_pre()]
- js_optimizer_queue += ['simplifyExpressionsPre']
if shared.Settings.RELOOP:
js_optimizer_queue += ['optimizeShiftsAggressive', get_eliminate()] # aggressive shifts optimization requires loops, it breaks on switches