aboutsummaryrefslogtreecommitdiff
path: root/src/relooper/test.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/relooper/test.txt')
-rw-r--r--src/relooper/test.txt177
1 files changed, 147 insertions, 30 deletions
diff --git a/src/relooper/test.txt b/src/relooper/test.txt
index 6c910846..2c530567 100644
--- a/src/relooper/test.txt
+++ b/src/relooper/test.txt
@@ -5,13 +5,21 @@
// block A
-if (check == 10) {
+switch (the_var) {
+check == 10 {
atob();
// block B
- btoc();
-} else {
+ switch (the_var) {
+ default: {
+ btoc();
+ }
+ }
+ break;
+}
+default: {
atoc();
}
+}
// block C
@@ -21,10 +29,22 @@ if (check == 10) {
// block A
-if (check == 15) {
+switch (the_var) {
+check == 15 {
// block B
-} else {
+ switch (the_var) {
+ default: {
+ }
+ }
+ break;
+}
+default: {
// block C
+ switch (the_var) {
+ default: {
+ }
+ }
+}
}
// block D
@@ -34,13 +54,22 @@ if (check == 15) {
-while(1) {
+L9: while(1) {
// block A
var check = maybe();
+ switch (the_var) {
+ default: {
+ }
+ }
// block B
- if (!(check == 41)) {
+ switch (the_var) {
+ check == 41 {
break;
}
+ default: {
+ break L9;
+ }
+ }
}
// block C
@@ -49,30 +78,56 @@ while(1) {
-- Loop with phi to head
// code 1
-var $i_0 = 0;var $x_0 = 5;
-while(1) {
+switch (the_var) {
+default: {
+ var $i_0 = 0;var $x_0 = 5;
+}
+}
+L14: while(1) {
// code 2
- if (!($2)) {
+ switch (the_var) {
+ $2 {
+ break;
+ }
+ default: {
var $x_1 = $x_0;
label = 18;
- break;
+ break L14;
+ }
}
// code 3
- if ($6) {
+ switch (the_var) {
+ $6 {
+ break L14;
break;
- } else {
+ }
+ default: {
var $i_0 = $7;var $x_0 = $5;
}
+ }
}
if (label == 18) {
// code 7
}
// code 4
-if ($10) {
+switch (the_var) {
+$10 {
// code 5
+ switch (the_var) {
+ default: {
+ }
+ }
+ break;
+}
+default: {
+}
}
// code 6
-var $x_1 = $13;
+switch (the_var) {
+default: {
+ var $x_1 = $13;
+}
+}
// code 7
@@ -82,17 +137,29 @@ var $x_1 = $13;
// block A...................................................................................................
-if (chak()) {
+switch (the_var) {
+chak() {
atob();
// block B...................................................................................................
- btod();
+ switch (the_var) {
+ default: {
+ btod();
+ }
+ }
// block D
-} else {
+ break;
+}
+default: {
atoc();
// block C...................................................................................................
- ctod2();
+ switch (the_var) {
+ default: {
+ ctod2();
+ }
+ }
// block D
}
+}
@@ -101,12 +168,25 @@ if (chak()) {
// block A
-if (!(check == 10)) {
+switch (the_var) {
+check == 10 {
+ break;
+}
+default: {
return C;
}
+}
while(1) {
// block B
+ switch (the_var) {
+ default: {
+ }
+ }
// block D
+ switch (the_var) {
+ default: {
+ }
+ }
}
@@ -116,24 +196,49 @@ while(1) {
// block A
-do {
- if (expensive()) {
+L37: do {
+ switch (the_var) {
+ expensive() {
label = 33;
- } else {
+ break;
+ }
+ default: {
// block B
- if (expensive2()) {
+ switch (the_var) {
+ expensive2() {
label = 33;
+ break L37;
break;
}
+ default: {
+ }
+ }
// block D
+ switch (the_var) {
+ default: {
+ }
+ }
+ }
}
} while(0);
if (label == 33) {
// block C;
+ switch (the_var) {
+ default: {
+ }
+ }
}
while(1) {
// block E
+ switch (the_var) {
+ default: {
+ }
+ }
// block F
+ switch (the_var) {
+ default: {
+ }
+ }
}
@@ -143,13 +248,25 @@ while(1) {
// block A
-if (shouldLoop()) {
- while(1) {
- // block B
- if (!(moarLoop())) {
- break;
+L46: do {
+ switch (the_var) {
+ shouldLoop() {
+ while(1) {
+ // block B
+ switch (the_var) {
+ moarLoop() {
+ break;
+ }
+ default: {
+ break L46;
+ }
+ }
}
+ break;
}
-}
+ default: {
+ }
+ }
+} while(0);
// block C