aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-si-output.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-14 20:05:33 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-17 17:56:17 -0700
commit3215f80b20f5cf98390c43a2c5c8b3f4ebcdd984 (patch)
tree28a3c5a52f7a3c07c1b45587f233ffe3b52a6fa1 /tools/test-js-optimizer-si-output.js
parent4f0e8c3aed0ce2e4606c5c8facacfbd3c015d375 (diff)
simplifyIfs js optimizer pass
Diffstat (limited to 'tools/test-js-optimizer-si-output.js')
-rw-r--r--tools/test-js-optimizer-si-output.js59
1 files changed, 59 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-si-output.js b/tools/test-js-optimizer-si-output.js
new file mode 100644
index 00000000..9a55281d
--- /dev/null
+++ b/tools/test-js-optimizer-si-output.js
@@ -0,0 +1,59 @@
+function a() {
+ if (x ? y : 0) {
+ g();
+ }
+ if (x) {
+ if (y) {
+ g();
+ } else {
+ h();
+ }
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ h();
+ }
+ if (x) {
+ if (y) {
+ g();
+ }
+ } else {
+ h();
+ }
+ if (x) {
+ f();
+ if (y) {
+ g();
+ }
+ }
+ if ((x ? y : 0) ? z : 0) {
+ g();
+ }
+ if (x) {
+ f();
+ if (y ? z : 0) {
+ g();
+ }
+ }
+ if (x ? y : 0) {
+ f();
+ if (z) {
+ g();
+ }
+ }
+ if (x ? y : 0) {
+ if (z) {
+ g();
+ }
+ f();
+ }
+ if (x) {
+ if (y ? z : 0) {
+ g();
+ }
+ f();
+ }
+}
+