aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-si-output.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-15 21:39:23 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-17 17:56:17 -0700
commitc4fc4453aacc8c1933e9cd256c04890978095003 (patch)
tree18b9f7065863fa8bd32abad2ae2454471b2058f6 /tools/test-js-optimizer-si-output.js
parent6c31546ced32fd968ae50da7803964c9195ebd62 (diff)
simplify nested ifs with identical elses
Diffstat (limited to 'tools/test-js-optimizer-si-output.js')
-rw-r--r--tools/test-js-optimizer-si-output.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-si-output.js b/tools/test-js-optimizer-si-output.js
index bd36ef10..8b93803d 100644
--- a/tools/test-js-optimizer-si-output.js
+++ b/tools/test-js-optimizer-si-output.js
@@ -66,5 +66,34 @@ function a() {
g();
}
}
+ andNowForElses();
+ if (x ? y : 0) {
+ f();
+ } else {
+ label = 5;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ } else {
+ label = 6;
+ }
+ if (x) {
+ if (y) {
+ f();
+ } else {
+ label = 5;
+ }
+ }
+ if (x) {
+ if (y) {
+ f();
+ }
+ } else {
+ label = 5;
+ }
}