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.txt401
1 files changed, 201 insertions, 200 deletions
diff --git a/src/relooper/test.txt b/src/relooper/test.txt
index 9b537fd9..540f7bdb 100644
--- a/src/relooper/test.txt
+++ b/src/relooper/test.txt
@@ -4,23 +4,23 @@
-// block A
-switch (the_var) {
-check == 10 {
- atob();
- // block B
+ // block A
switch (the_var) {
+ check == 10 {
+ atob();
+ // block B
+ switch (the_var) {
+ default: {
+ btoc();
+ }
+ }
+ break;
+ }
default: {
- btoc();
+ atoc();
}
}
- break;
-}
-default: {
- atoc();
-}
-}
-// block C
+ // block C
@@ -28,25 +28,25 @@ default: {
-// block A
-switch (the_var) {
-check == 15 {
- // block B
+ // block A
switch (the_var) {
- default: {
- }
+ check == 15 {
+ // block B
+ switch (the_var) {
+ default: {
+ }
+ }
+ break;
}
- break;
-}
-default: {
- // block C
- switch (the_var) {
default: {
+ // block C
+ switch (the_var) {
+ default: {
+ }
+ }
}
}
-}
-}
-// block D
+ // block D
@@ -54,81 +54,81 @@ default: {
-L9: while(1) {
- // block A
- var check = maybe();
- switch (the_var) {
- default: {
- }
- }
- // block B
- switch (the_var) {
- check == 41 {
- break;
- }
- default: {
- break L9;
- }
+ L0: while(1) {
+ // block A
+ var check = maybe();
+ switch (the_var) {
+ default: {
+ }
+ }
+ // block B
+ switch (the_var) {
+ check == 41 {
+ break;
+ }
+ default: {
+ break L0;
+ }
+ }
}
-}
-// block C
+ // block C
-- Loop with phi to head
-// code 1
-switch (the_var) {
-default: {
- var $i_0 = 0;var $x_0 = 5;
-}
-}
-L14: while(1) {
- // code 2
+ // code 1
switch (the_var) {
- $2 {
- break;
- }
default: {
- var $x_1 = $x_0;
- label = 18;
- break L14;
+ var $i_0 = 0;var $x_0 = 5;
+ }
+ }
+ L1: while(1) {
+ // code 2
+ switch (the_var) {
+ $2 {
+ break;
+ }
+ default: {
+ var $x_1 = $x_0;
+ label = -1;
+ break L1;
+ }
+ }
+ // code 3
+ switch (the_var) {
+ $6 {
+ break L1;
+ break;
+ }
+ default: {
+ var $i_0 = $7;var $x_0 = $5;
+ }
+ }
}
+ if (label == -1) {
+ // code 7
}
- // code 3
+ // code 4
switch (the_var) {
- $6 {
- break L14;
+ $10 {
+ // code 5
+ switch (the_var) {
+ default: {
+ }
+ }
break;
}
default: {
- var $i_0 = $7;var $x_0 = $5;
}
}
-}
-if (label == 18) {
- // code 7
-}
-// code 4
-switch (the_var) {
-$10 {
- // code 5
+ // code 6
switch (the_var) {
default: {
+ var $x_1 = $13;
}
}
- break;
-}
-default: {
-}
-}
-// code 6
-switch (the_var) {
-default: {
- var $x_1 = $13;
-}
-}
-// code 7
+ // code 7
@@ -136,30 +136,30 @@ default: {
-// block A...................................................................................................
-switch (the_var) {
-chak() {
- atob();
- // block B...................................................................................................
+ // block A...................................................................................................
switch (the_var) {
- default: {
- btod();
- }
+ chak() {
+ atob();
+ // block B...................................................................................................
+ switch (the_var) {
+ default: {
+ btod();
+ }
+ }
+ // block D
+ break;
}
- // block D
- break;
-}
-default: {
- atoc();
- // block C...................................................................................................
- switch (the_var) {
default: {
- ctod2();
+ atoc();
+ // block C...................................................................................................
+ switch (the_var) {
+ default: {
+ ctod2();
+ }
+ }
+ // block D
}
}
- // block D
-}
-}
@@ -167,49 +167,18 @@ default: {
-// block A
-switch (the_var) {
-check == 10 {
- break;
-}
-default: {
- return C;
-}
-}
-while(1) {
- // block B
+ // block A
switch (the_var) {
- default: {
- }
+ check == 10 {
+ break;
}
- // block D
- switch (the_var) {
default: {
+ return C;
}
}
-}
-
-
-
--- if (expensive || expensive2) X else Y; Z --
-
-
-
-// block A
-L37: do {
- switch (the_var) {
- expensive() {
- label = 33;
- break;
- }
- default: {
+ while(1) {
// block B
switch (the_var) {
- expensive2() {
- label = 33;
- break L37;
- break;
- }
default: {
}
}
@@ -219,98 +188,130 @@ L37: do {
}
}
}
- }
-} 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: {
- }
- }
-}
--- conditional loop --
+-- if (expensive || expensive2) X else Y; Z --
-// block A
-L46: do {
- switch (the_var) {
- shouldLoop() {
- while(1) {
+ // block A
+ L1: do {
+ switch (the_var) {
+ expensive() {
+ label = 3;
+ break;
+ }
+ default: {
// block B
switch (the_var) {
- moarLoop() {
+ expensive2() {
+ label = 3;
+ break L1;
break;
}
default: {
- break L46;
+ }
+ }
+ // block D
+ switch (the_var) {
+ default: {
}
}
}
- break;
- }
- default: {
+ }
+ } while(0);
+ if (label == 3) {
+ // block C;
+ switch (the_var) {
+ default: {
+ }
+ }
}
+ while(1) {
+ // block E
+ switch (the_var) {
+ default: {
+ }
+ }
+ // block F
+ switch (the_var) {
+ default: {
+ }
+ }
}
-} while(0);
-// block C
--- If pattern, emulated --
+-- conditional loop --
-L50: while(1) {
- switch(label) {
- case 40: {
- // block A
- if (check == 10) {
- atob();
- label = 41;
- continue L50;
- } else {
- atoc();
- label = 42;
- continue L50;
+ // block A
+ L1: do {
+ switch (the_var) {
+ shouldLoop() {
+ while(1) {
+ // block B
+ switch (the_var) {
+ moarLoop() {
+ break;
+ }
+ default: {
+ break L1;
+ }
+ }
}
break;
}
- case 41: {
- // block B
- switch (b_check()) {
- case 17: {
- btoc();
- label = 42;
- continue L50;
+ default: {
+ }
+ }
+ } while(0);
+ // block C
+
+
+
+-- If pattern, emulated --
+
+
+
+ label = 1;
+ L0: while(1) {
+ switch(label|0) {
+ case 3: {
+ // block C
break;
}
- default: {
- label = 40;
- continue L50;
+ case 1: {
+ // block A
+ if (check == 10) {
+ atob();
+ label = 2;
+ continue L0;
+ } else {
+ atoc();
+ label = 3;
+ continue L0;
+ }
+ break;
}
+ case 2: {
+ // block B
+ switch (b_check()) {
+ case 17: {
+ btoc();
+ label = 3;
+ continue L0;
+ break;
+ }
+ default: {
+ label = 1;
+ continue L0;
+ }
+ }
+ break;
}
- break;
- }
- case 42: {
- // block C
- break;
}
}
-}