diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-24 20:06:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-24 20:06:54 -0700 |
commit | 9aa1c31c714c959fe114191c92b22ea8c4f6d122 (patch) | |
tree | b34eabba5d03f0ab9cb6f4f9bf326446b6e64797 /tools/test-js-optimizer-asm-outline1.js | |
parent | d1bf01006240e8d17eab7720208f731fd93d2751 (diff) |
flatten if chains in outliner, and be more careful to avoid outlining through an outline call
Diffstat (limited to 'tools/test-js-optimizer-asm-outline1.js')
-rw-r--r-- | tools/test-js-optimizer-asm-outline1.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-asm-outline1.js b/tools/test-js-optimizer-asm-outline1.js index 40026439..311cb206 100644 --- a/tools/test-js-optimizer-asm-outline1.js +++ b/tools/test-js-optimizer-asm-outline1.js @@ -230,5 +230,34 @@ function vars_w_stack(x, y) { b = c(7+a); STACKTOP = sp; } +function chain() { + if (x == 1) { + print(1); + } else if (x == 2) { + print(2); + } else if (x == 3) { + print(3); + } else if (x == 4) { + print(4); + } else if (x == 5) { + print(5); + } else if (x == 6) { + print(6); + } else if (x == 7) { + print(7); + } else if (x == 8) { + print(8); + } else if (x == 9) { + print(9); + } else if (x == 10) { + print(10); + } else if (x == 11) { + print(11); + } else if (x == 12) { + print(12); + } else { + print(99); + } +} // EMSCRIPTEN_GENERATED_FUNCTIONS // EXTRA_INFO: { "sizeToOutline": 30, "allowCostlyOutlines": 1 } |