aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-16 18:12:08 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-16 18:22:28 -0700
commit9da6e1f33581bcb2c139ebcec08c61a5df2b010a (patch)
tree423e8028cd1d621b1e2dda430e0ec39ab20cb071 /emcc
parent4782b382e907c7db873e66b65e2aac26096756b0 (diff)
support closure compiler on the shell in asm mode
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc10
1 files changed, 5 insertions, 5 deletions
diff --git a/emcc b/emcc
index d368a4e5..775e2fe4 100755
--- a/emcc
+++ b/emcc
@@ -1024,9 +1024,6 @@ try:
if bind:
shared.Settings.ASM_JS = 0
logging.warning('disabling asm.js because it is not compatible with embind yet')
- if closure:
- logging.warning('disabling closure because it is not compatible with asm.js code generation')
- closure = False
if shared.Settings.CORRECT_SIGNS != 1:
logging.warning('setting CORRECT_SIGNS to 1 for asm.js code generation')
shared.Settings.CORRECT_SIGNS = 1
@@ -1549,7 +1546,7 @@ try:
if shared.Settings.RELOOP and not shared.Settings.ASM_JS:
js_optimizer_queue += ['optimizeShiftsAggressive', get_eliminate()] # aggressive shifts optimization requires loops, it breaks on switches
- if closure:
+ if closure and not shared.Settings.ASM_JS:
flush_js_optimizer_queue()
logging.debug('running closure')
@@ -1560,13 +1557,16 @@ try:
logging.debug('running post-closure post-opts')
js_optimizer_queue += ['simplifyExpressionsPost']
- if not closure and shared.Settings.RELOOP and not keep_js_debug:
+ if (not closure or shared.Settings.ASM_JS) and shared.Settings.RELOOP and not keep_js_debug:
# do this if closure is not enabled (it gives similar speedups), and we do not need to keep debug info around
js_optimizer_queue += ['registerize']
if minify_whitespace:
js_optimizer_queue += ['compress']
+ if closure and shared.Settings.ASM_JS:
+ js_optimizer_queue += ['closure']
+
js_optimizer_queue += ['last']
flush_js_optimizer_queue()