diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-28 10:39:44 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-28 10:39:44 -0800 |
commit | 493eed11c24fc51716a08df7b72d5f0021e6535e (patch) | |
tree | 47be247a230d7890e8a37788206e0220c87573c8 | |
parent | 9e1c9c1577669424a9c7dee86b34f20ad6366c8e (diff) |
optimize relooper id counters1.8.0
-rw-r--r-- | src/relooper/Relooper.cpp | 12 | ||||
-rw-r--r-- | src/relooper/Relooper.h | 14 | ||||
-rw-r--r-- | src/relooper/test.txt | 401 | ||||
-rw-r--r-- | src/relooper/test2.txt | 40 | ||||
-rw-r--r-- | src/relooper/test3.txt | 82 | ||||
-rw-r--r-- | src/relooper/test4.txt | 52 | ||||
-rw-r--r-- | src/relooper/test5.txt | 104 | ||||
-rw-r--r-- | src/relooper/test6.txt | 38 | ||||
-rw-r--r-- | src/relooper/test_dead.txt | 2 | ||||
-rw-r--r-- | src/relooper/test_debug.txt | 62 | ||||
-rw-r--r-- | src/relooper/test_fuzz1.txt | 100 | ||||
-rw-r--r-- | src/relooper/test_fuzz2.txt | 42 | ||||
-rw-r--r-- | src/relooper/test_fuzz3.txt | 36 | ||||
-rw-r--r-- | src/relooper/test_fuzz4.txt | 56 | ||||
-rw-r--r-- | src/relooper/test_fuzz5.txt | 122 | ||||
-rw-r--r-- | src/relooper/test_fuzz6.txt | 358 | ||||
-rw-r--r-- | src/relooper/test_inf.txt | 1606 | ||||
-rw-r--r-- | tools/shared.py | 2 |
18 files changed, 1561 insertions, 1568 deletions
diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index fc7b3ea7..70cf844b 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -101,9 +101,7 @@ void Branch::Render(Block *Target, bool SetLabel) { // Block -int Block::IdCounter = 1; // 0 is reserved for clearings - -Block::Block(const char *CodeInit, const char *BranchVarInit) : Parent(NULL), Id(Block::IdCounter++), IsCheckedMultipleEntry(false) { +Block::Block(const char *CodeInit, const char *BranchVarInit) : Parent(NULL), Id(-1), IsCheckedMultipleEntry(false) { Code = strdup(CodeInit); BranchVar = BranchVarInit ? strdup(BranchVarInit) : NULL; } @@ -273,10 +271,6 @@ void Block::Render(bool InLoop) { } } -// Shape - -int Shape::IdCounter = 0; - // MultipleShape void MultipleShape::RenderLoopPrefix() { @@ -360,7 +354,7 @@ void EmulatedShape::Render(bool InLoop) { // Relooper -Relooper::Relooper() : Root(NULL), Emulate(false) { +Relooper::Relooper() : Root(NULL), Emulate(false), BlockIdCounter(1), ShapeIdCounter(0) { // block ID 0 is reserved for clearings } Relooper::~Relooper() { @@ -369,6 +363,7 @@ Relooper::~Relooper() { } void Relooper::AddBlock(Block *New) { + New->Id = BlockIdCounter++; Blocks.push_back(New); } @@ -473,6 +468,7 @@ void Relooper::Calculate(Block *Entry) { // Add a shape to the list of shapes in this Relooper calculation void Notice(Shape *New) { + New->Id = Parent->ShapeIdCounter++; Parent->Shapes.push_back(New); } diff --git a/src/relooper/Relooper.h b/src/relooper/Relooper.h index e78d18e7..04f2ffc3 100644 --- a/src/relooper/Relooper.h +++ b/src/relooper/Relooper.h @@ -57,7 +57,7 @@ struct Block { BlockBranchMap ProcessedBranchesOut; BlockSet ProcessedBranchesIn; Shape *Parent; // The shape we are directly inside - int Id; // A unique identifier + int Id; // A unique identifier, defined when added to relooper const char *Code; // The string representation of the code in this block. Owning pointer (we copy the input) const char *BranchVar; // If we have more than one branch out, the variable whose value determines where we go bool IsCheckedMultipleEntry; // If true, we are a multiple entry, so reaching us requires setting the label variable @@ -69,9 +69,6 @@ struct Block { // Prints out the instructions code and branchings void Render(bool InLoop); - - // INTERNAL - static int IdCounter; }; // Represents a structured control flow shape, one of @@ -99,7 +96,7 @@ class LoopShape; class EmulatedShape; struct Shape { - int Id; // A unique identifier. Used to identify loops, labels are Lx where x is the Id. + int Id; // A unique identifier. Used to identify loops, labels are Lx where x is the Id. Defined when added to relooper Shape *Next; // The shape that will appear in the code right after this one Shape *Natural; // The shape that control flow gets to naturally (if there is Next, then this is Next) @@ -111,7 +108,7 @@ struct Shape { }; ShapeType Type; - Shape(ShapeType TypeInit) : Id(Shape::IdCounter++), Next(NULL), Type(TypeInit) {} + Shape(ShapeType TypeInit) : Id(-1), Next(NULL), Type(TypeInit) {} virtual ~Shape() {} virtual void Render(bool InLoop) = 0; @@ -121,9 +118,6 @@ struct Shape { static LoopShape *IsLoop(Shape *It) { return It && It->Type == Loop ? (LoopShape*)It : NULL; } static LabeledShape *IsLabeled(Shape *It) { return IsMultiple(It) || IsLoop(It) ? (LabeledShape*)It : NULL; } static EmulatedShape *IsEmulated(Shape *It) { return It && It->Type == Emulated ? (EmulatedShape*)It : NULL; } - - // INTERNAL - static int IdCounter; }; struct SimpleShape : public Shape { @@ -191,6 +185,8 @@ struct Relooper { std::deque<Shape*> Shapes; Shape *Root; bool Emulate; + int BlockIdCounter; + int ShapeIdCounter; Relooper(); ~Relooper(); 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; } } -} diff --git a/src/relooper/test2.txt b/src/relooper/test2.txt index a558a8b7..aba9ec1f 100644 --- a/src/relooper/test2.txt +++ b/src/relooper/test2.txt @@ -1,26 +1,26 @@ -ep -L1: do { - switch (var) { - ep -> LBB1 { - LBB1 - switch (the_var) { - LBB1 -> LBB2 { + ep + L1: do { + switch (var) { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - LBB2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -LBB3 + } while(0); + LBB3 diff --git a/src/relooper/test3.txt b/src/relooper/test3.txt index f77e2618..33f85a7e 100644 --- a/src/relooper/test3.txt +++ b/src/relooper/test3.txt @@ -1,56 +1,56 @@ -ep -L1: do { - switch (the_var) { - ep -> LBB1 { - LBB1 + ep + L1: do { switch (the_var) { - LBB1 -> LBB2 { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; - } - } - LBB2 - switch (the_var) { - default: { } } - break; - } - default: { - } - } -} while(0); -LBB3 -L5: do { - switch (the_var) { - LBB3 -> LBB4 { - LBB4 + } while(0); + LBB3 + L5: do { switch (the_var) { - LBB4 -> LBB5 { - break; - } - default: { - break L5; - } - } - while(1) { - LBB5 + LBB3 -> LBB4 { + LBB4 switch (the_var) { - LBB5 -> LBB6 { - break L5; + LBB4 -> LBB5 { break; } default: { + break L5; + } } + while(1) { + LBB5 + switch (the_var) { + LBB5 -> LBB6 { + break L5; + break; + } + default: { + } + } } + break; + } + default: { + } } - break; - } - default: { - } - } -} while(0); -LBB6 + } while(0); + LBB6 diff --git a/src/relooper/test4.txt b/src/relooper/test4.txt index 1829e523..7e3fe8e1 100644 --- a/src/relooper/test4.txt +++ b/src/relooper/test4.txt @@ -1,44 +1,44 @@ -//19 -L1: do { - switch (the_var) { - 1 { - //20 + //19 + L1: do { switch (the_var) { 1 { + //20 + switch (the_var) { + 1 { + break; + } + default: { + label = 4; + break L1; + } + } + //21 + switch (the_var) { + default: { + } + } break; } default: { label = 4; - break L1; } } - //21 + } while(0); + if (label == 4) { + //22 switch (the_var) { default: { } } - break; - } - default: { - label = 4; } - } -} while(0); -if (label == 4) { - //22 + //23 switch (the_var) { + 1 { + //24 + break; + } default: { + //28 } } -} -//23 -switch (the_var) { - 1 { - //24 - break; -} -default: { - //28 -} -} diff --git a/src/relooper/test5.txt b/src/relooper/test5.txt index 82ef5edf..e3c204f6 100644 --- a/src/relooper/test5.txt +++ b/src/relooper/test5.txt @@ -1,56 +1,56 @@ -//0 -switch (the_var) { -check(0) { - L2: while(1) { - //1 - switch (the_var) { - check(1) { - break; - } - default: { - break L2; - } - } + //0 + switch (the_var) { + check(0) { + L2: while(1) { + //1 + switch (the_var) { + check(1) { + break; + } + default: { + break L2; + } + } + } + L4: while(1) { + //2 + switch (the_var) { + check(2) { + break; + } + default: { + break L4; + } + } + } + //3 + break; } - L4: while(1) { - //2 - switch (the_var) { - check(2) { - break; - } - default: { - break L4; - } - } + default: { + goingFrom0to4(); + L7: while(1) { + //4 + switch (the_var) { + check(4) { + break; + } + default: { + break L7; + } + } + } + L9: while(1) { + //5 + switch (the_var) { + check(5) { + break L9; + break; + } + default: { + } + } + } + //3 } - //3 - break; -} -default: { - goingFrom0to4(); - L7: while(1) { - //4 - switch (the_var) { - check(4) { - break; - } - default: { - break L7; - } - } - } - L9: while(1) { - //5 - switch (the_var) { - check(5) { - break L9; - break; - } - default: { - } - } } - //3 -} -} diff --git a/src/relooper/test6.txt b/src/relooper/test6.txt index f9d6e93a..837fc243 100644 --- a/src/relooper/test6.txt +++ b/src/relooper/test6.txt @@ -1,26 +1,26 @@ -//0 -L1: do { - switch (the_var) { - check(0) { - //1 + //0 + L1: do { switch (the_var) { - check(1) { + check(0) { + //1 + switch (the_var) { + check(1) { + break; + } + default: { + break L1; + } + } + //2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - //2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -//3 + } while(0); + //3 diff --git a/src/relooper/test_dead.txt b/src/relooper/test_dead.txt index ae54e2cd..43d557ae 100644 --- a/src/relooper/test_dead.txt +++ b/src/relooper/test_dead.txt @@ -4,6 +4,6 @@ -// block A + // block A I did not crash even though I have dead code with a branch! diff --git a/src/relooper/test_debug.txt b/src/relooper/test_debug.txt index eb33fdbc..498dee39 100644 --- a/src/relooper/test_debug.txt +++ b/src/relooper/test_debug.txt @@ -4,18 +4,18 @@ int main() { rl_set_output_buffer(buffer); void *block_map[10000]; void *rl = rl_new_relooper(); - void *b1 = rl_new_block("// code 1"); - block_map[1] = b1; - rl_relooper_add_block(rl, block_map[1]); - void *b2 = rl_new_block("// code 2"); - block_map[2] = b2; - rl_relooper_add_block(rl, block_map[2]); - void *b3 = rl_new_block("// code 3"); - block_map[3] = b3; - rl_relooper_add_block(rl, block_map[3]); - void *b4 = rl_new_block("// code 4"); - block_map[4] = b4; - rl_relooper_add_block(rl, block_map[4]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); + void *b-1 = rl_new_block("// code -1"); + block_map[-1] = b-1; + rl_relooper_add_block(rl, block_map[-1]); rl_block_add_branch_to(block_map[1], block_map[2], "ep -> LBB1", NULL); rl_block_add_branch_to(block_map[1], block_map[4], NULL, NULL); rl_block_add_branch_to(block_map[2], block_map[3], "LBB1 -> LBB2", NULL); @@ -114,29 +114,29 @@ int main() { // Process() returning // === Optimizing shapes === // Fusing Multiple to Simple -ep -L1: do { - switch (the_var) { - ep -> LBB1 { - LBB1 + ep + L1: do { switch (the_var) { - LBB1 -> LBB2 { + ep -> LBB1 { + LBB1 + switch (the_var) { + LBB1 -> LBB2 { + break; + } + default: { + break L1; + } + } + LBB2 + switch (the_var) { + default: { + } + } break; } default: { - break L1; } } - LBB2 - switch (the_var) { - default: { - } - } - break; - } - default: { - } - } -} while(0); -LBB3 + } while(0); + LBB3 diff --git a/src/relooper/test_fuzz1.txt b/src/relooper/test_fuzz1.txt index d887f5b8..ccd38934 100644 --- a/src/relooper/test_fuzz1.txt +++ b/src/relooper/test_fuzz1.txt @@ -1,72 +1,72 @@ -print('entry'); var label; var state; var decisions = [4, 1, 7, 2, 6, 6, 8]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -print(5); state = check(); -switch (the_var) { -default: { -} -} -print(6); state = check(); -switch (the_var) { -state == 7 { - print(7); state = check(); + print('entry'); var label; var state; var decisions = [4, 1, 7, 2, 6, 6, 8]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { - label = 3; } } - break; -} -default: { -} -} -L5: while(1) { - if (label == 3) { - label = 0; - print(2); state = check(); + print(5); state = check(); + switch (the_var) { + default: { + } + } + print(6); state = check(); + switch (the_var) { + state == 7 { + print(7); state = check(); switch (the_var) { default: { + label = 3; } } + break; } - print(1); state = check(); - switch (the_var) { default: { } } - while(1) { - print(3); state = check(); - switch (the_var) { - state == 8 { - break; + L5: while(1) { + if (label == 3) { + label = 0; + print(2); state = check(); + switch (the_var) { + default: { + } + } } - default: { - continue L5; - } - } - print(8); state = check(); + print(1); state = check(); switch (the_var) { - state == 4 { - break; - } default: { - label = 3; - continue L5; } } - print(4); state = check(); - switch (the_var) { - state == 3 { - break; - } - default: { - continue L5; - } + while(1) { + print(3); state = check(); + switch (the_var) { + state == 8 { + break; + } + default: { + continue L5; + } + } + print(8); state = check(); + switch (the_var) { + state == 4 { + break; + } + default: { + label = 3; + continue L5; + } + } + print(4); state = check(); + switch (the_var) { + state == 3 { + break; + } + default: { + continue L5; + } + } } } -} diff --git a/src/relooper/test_fuzz2.txt b/src/relooper/test_fuzz2.txt index 69f4350c..a94908a1 100644 --- a/src/relooper/test_fuzz2.txt +++ b/src/relooper/test_fuzz2.txt @@ -1,30 +1,30 @@ -print('entry'); var label; var state; var decisions = [4, 1, 4, 3, 4, 1, 2, 5, 1, 3, 5, 5, 1, 5, 2, 4, 4, 3]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -state == 1 { - while(1) { - print(1); state = check(); - switch (the_var) { - default: { - } + print('entry'); var label; var state; var decisions = [4, 1, 4, 3, 4, 1, 2, 5, 1, 3, 5, 5, 1, 5, 2, 4, 4, 3]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } + switch (the_var) { + state == 1 { + while(1) { + print(1); state = check(); + switch (the_var) { + default: { + } + } } + break; } - break; -} -default: { -} -} -while(1) { - print(3); state = check(); - switch (the_var) { default: { } } - print(2); state = check(); - switch (the_var) { - default: { - } + while(1) { + print(3); state = check(); + switch (the_var) { + default: { + } + } + print(2); state = check(); + switch (the_var) { + default: { + } + } } -} diff --git a/src/relooper/test_fuzz3.txt b/src/relooper/test_fuzz3.txt index 398b4803..15037eec 100644 --- a/src/relooper/test_fuzz3.txt +++ b/src/relooper/test_fuzz3.txt @@ -1,25 +1,25 @@ -print('entry'); var label; var state; var decisions = [3, 3, 4, 1, 2, 1, 2, 4, 4, 4, 2, 3, 3, 1, 2]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -print(1); state = check(); -switch (the_var) { -default: { -} -} -print(3); state = check(); -switch (the_var) { -default: { -} -} -while(1) { - print(4); state = check(); + print('entry'); var label; var state; var decisions = [3, 3, 4, 1, 2, 1, 2, 4, 4, 4, 2, 3, 3, 1, 2]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { } } -} + print(1); state = check(); + switch (the_var) { + default: { + } + } + print(3); state = check(); + switch (the_var) { + default: { + } + } + while(1) { + print(4); state = check(); + switch (the_var) { + default: { + } + } + } diff --git a/src/relooper/test_fuzz4.txt b/src/relooper/test_fuzz4.txt index 2e2f2c6f..adf879f9 100644 --- a/src/relooper/test_fuzz4.txt +++ b/src/relooper/test_fuzz4.txt @@ -1,41 +1,41 @@ -print('entry'); var label; var state; var decisions = [2, 2, 1, 3, 2, 2, 1, 3, 2, 3, 3, 1, 3, 2, 1]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -state == 2 { - while(1) { - print(2); state = check(); - switch (the_var) { - default: { - } - } - } - break; -} -default: { -} -} -L4: while(1) { - print(4); state = check(); + print('entry'); var label; var state; var decisions = [2, 2, 1, 3, 2, 2, 1, 3, 2, 3, 3, 1, 3, 2, 1]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { - state == 4 { + state == 2 { + while(1) { + print(2); state = check(); + switch (the_var) { + default: { + } + } + } break; } default: { - break L4; } } -} -print(3); state = check(); -switch (the_var) { -default: { -} -} -while(1) { - print(1); state = check(); + L4: while(1) { + print(4); state = check(); + switch (the_var) { + state == 4 { + break; + } + default: { + break L4; + } + } + } + print(3); state = check(); switch (the_var) { default: { } } -} + while(1) { + print(1); state = check(); + switch (the_var) { + default: { + } + } + } diff --git a/src/relooper/test_fuzz5.txt b/src/relooper/test_fuzz5.txt index f87e5b79..fea540ed 100644 --- a/src/relooper/test_fuzz5.txt +++ b/src/relooper/test_fuzz5.txt @@ -1,86 +1,86 @@ -print('entry'); var label; var state; var decisions = [133, 98, 134, 143, 162, 187, 130, 87, 91, 49, 102, 47, 9, 132, 179, 176, 157, 25, 64, 161, 57, 107, 16, 167, 185, 45, 191, 180, 23, 131]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -L1: while(1) { - print(7); state = check(); + print('entry'); var label; var state; var decisions = [133, 98, 134, 143, 162, 187, 130, 87, 91, 49, 102, 47, 9, 132, 179, 176, 157, 25, 64, 161, 57, 107, 16, 167, 185, 45, 191, 180, 23, 131]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { - state % 3 == 1 { - label = 3; - break; + default: { + } } - state % 3 == 0 { - print(8); state = check(); + L1: while(1) { + print(7); state = check(); switch (the_var) { - state % 2 == 0 { - label = 5; + state % 3 == 1 { + label = 3; break; } - default: { - label = 7; - } - } - break; - } - default: { - break L1; - } - } - L5: while(1) { - if (label == 3) { - label = 0; - print(2); state = check(); - switch (the_var) { - default: { - } - } - print(1); state = check(); + state % 3 == 0 { + print(8); state = check(); switch (the_var) { state % 2 == 0 { label = 5; - continue L5; break; } default: { label = 7; - continue L5; } } + break; } - else if (label == 5) { - label = 0; - print(4); state = check(); - switch (the_var) { - default: { - label = 3; - continue L5; - } - } + default: { + break L1; } - else if (label == 7) { - label = 0; - print(6); state = check(); - switch (the_var) { - state % 2 == 0 { - continue L1; - break; + } + L5: while(1) { + if (label == 3) { + label = 0; + print(2); state = check(); + switch (the_var) { + default: { + } + } + print(1); state = check(); + switch (the_var) { + state % 2 == 0 { + label = 5; + continue L5; + break; + } + default: { + label = 7; + continue L5; + } + } } - default: { - label = 7; - continue L5; + else if (label == 5) { + label = 0; + print(4); state = check(); + switch (the_var) { + default: { + label = 3; + continue L5; + } + } } + else if (label == 7) { + label = 0; + print(6); state = check(); + switch (the_var) { + state % 2 == 0 { + continue L1; + break; + } + default: { + label = 7; + continue L5; + } + } } } } -} -while(1) { - print(3); state = check(); - switch (the_var) { - default: { - } + while(1) { + print(3); state = check(); + switch (the_var) { + default: { + } + } } -} diff --git a/src/relooper/test_fuzz6.txt b/src/relooper/test_fuzz6.txt index b9c1499a..40605dfc 100644 --- a/src/relooper/test_fuzz6.txt +++ b/src/relooper/test_fuzz6.txt @@ -1,291 +1,291 @@ -print('entry'); var label; var state; var decisions = [759, 1223, 618, 1805, 277, 512, 204, 1545, 606, 734, 585, 447, 1670, 1031, 665, 1728, 353, 634, 1033, 13, 658, 589, 474, 854, 405, 1111, 1640, 697, 1156, 1357, 317, 618, 990, 1401, 405, 564, 497, 829, 653, 1194, 25, 322, 1178, 198, 1565, 1419, 1608, 486, 368, 606, 813, 22, 148, 141, 261, 375, 472, 964, 1106, 694, 205, 771, 44, 675, 545, 1027, 1528, 240, 1289, 564, 792, 744, 366, 668, 823, 210, 428, 1009, 1662, 1317, 1183, 681, 14, 1334, 712, 506, 224, 695, 401, 1035, 384, 486, 1519, 122, 1186, 1487, 1819, 1702, 463, 1706, 660, 1642, 847, 991, 976, 940, 867, 46, 23, 1449, 56, 1711, 634, 404, 1558, 168, 710, 1581, 1302, 870, 997, 1295, 1739, 769, 1005, 291, 1638, 1771, 842, 659, 1695, 713, 935, 802, 1173, 1572, 850, 607, 996, 55, 1576, 321, 1815, 662, 1044, 1612, 1680, 1050, 844, 553, 278, 1447, 1662, 1094, 1797, 774, 1013, 1204, 907, 340, 1172, 1460, 869, 1264, 111, 1176, 484, 845, 258, 417, 1246, 1017, 745, 189, 333, 1658, 1395, 1764, 1786, 165, 404, 847, 1429, 1574, 403, 718, 1118, 1756, 94, 56, 1498, 1696, 1355, 840, 50, 82, 371, 1087, 875, 1337, 267, 958, 1209, 1167, 1025, 1684, 184, 962, 1496, 201, 127, 372, 1, 1005, 402, 1387, 213, 1143, 1271, 167, 10, 12, 1060, 1390, 1366, 893, 747, 1005, 481, 876, 227, 514, 589, 250, 273, 1188, 1052, 719, 219, 1006, 38, 120, 1454, 489, 672, 149, 534, 1081, 1721, 586, 330, 25, 356, 1743, 1607, 336, 981, 419, 1036, 1293, 1026, 1300, 1453, 792, 22, 45, 420, 409, 1027, 1437, 1421, 795, 136, 1276, 1610, 1593]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } -switch (the_var) { -default: { -} -} -L1: while(1) { - print(30); state = check();// ................................................................................................................................................................................................................. - switch (the_var) { - state % 3 == 0 { - break; - } - state % 3 == 1 { - label = 67; - break L1; - break; - } - default: { - break L1; - } - } - print(58); state = check();// ...................................................................................... - switch (the_var) { - default: { - } - } -} -if (label == 67) { - print(66); state = check();// ............................................................................................................... + print('entry'); var label; var state; var decisions = [759, 1223, 618, 1805, 277, 512, 204, 1545, 606, 734, 585, 447, 1670, 1031, 665, 1728, 353, 634, 1033, 13, 658, 589, 474, 854, 405, 1111, 1640, 697, 1156, 1357, 317, 618, 990, 1401, 405, 564, 497, 829, 653, 1194, 25, 322, 1178, 198, 1565, 1419, 1608, 486, 368, 606, 813, 22, 148, 141, 261, 375, 472, 964, 1106, 694, 205, 771, 44, 675, 545, 1027, 1528, 240, 1289, 564, 792, 744, 366, 668, 823, 210, 428, 1009, 1662, 1317, 1183, 681, 14, 1334, 712, 506, 224, 695, 401, 1035, 384, 486, 1519, 122, 1186, 1487, 1819, 1702, 463, 1706, 660, 1642, 847, 991, 976, 940, 867, 46, 23, 1449, 56, 1711, 634, 404, 1558, 168, 710, 1581, 1302, 870, 997, 1295, 1739, 769, 1005, 291, 1638, 1771, 842, 659, 1695, 713, 935, 802, 1173, 1572, 850, 607, 996, 55, 1576, 321, 1815, 662, 1044, 1612, 1680, 1050, 844, 553, 278, 1447, 1662, 1094, 1797, 774, 1013, 1204, 907, 340, 1172, 1460, 869, 1264, 111, 1176, 484, 845, 258, 417, 1246, 1017, 745, 189, 333, 1658, 1395, 1764, 1786, 165, 404, 847, 1429, 1574, 403, 718, 1118, 1756, 94, 56, 1498, 1696, 1355, 840, 50, 82, 371, 1087, 875, 1337, 267, 958, 1209, 1167, 1025, 1684, 184, 962, 1496, 201, 127, 372, 1, 1005, 402, 1387, 213, 1143, 1271, 167, 10, 12, 1060, 1390, 1366, 893, 747, 1005, 481, 876, 227, 514, 589, 250, 273, 1188, 1052, 719, 219, 1006, 38, 120, 1454, 489, 672, 149, 534, 1081, 1721, 586, 330, 25, 356, 1743, 1607, 336, 981, 419, 1036, 1293, 1026, 1300, 1453, 792, 22, 45, 420, 409, 1027, 1437, 1421, 795, 136, 1276, 1610, 1593]; var index = 0; function check() { if (index == decisions.length) throw 'HALT'; return decisions[index++] } switch (the_var) { default: { } } -} -print(6); state = check();// ......... -switch (the_var) { -default: { -} -} -while(1) { - print(88); state = check();// .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { + L1: while(1) { + print(30); state = check();// ................................................................................................................................................................................................................. + switch (the_var) { + state % 3 == 0 { + break; + } + state % 3 == 1 { + label = 67; + break L1; + break; + } + default: { + break L1; + } + } + print(58); state = check();// ...................................................................................... + switch (the_var) { + default: { + } + } } + if (label == 67) { + print(66); state = check();// ............................................................................................................... + switch (the_var) { + default: { + } + } } - print(70); state = check();// .......................................................................................................................... + print(6); state = check();// ......... switch (the_var) { default: { } } - L10: while(1) { - print(47); state = check();// .................................................................................................................................... + while(1) { + print(88); state = check();// .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(28); state = check();// .............................................................................................................. + print(70); state = check();// .......................................................................................................................... switch (the_var) { default: { } } - L13: while(1) { - print(75); state = check();// ............................................. + L10: while(1) { + print(47); state = check();// .................................................................................................................................... switch (the_var) { default: { } } - print(7); state = check();// ............................................................................................................................................................................................. + print(28); state = check();// .............................................................................................................. switch (the_var) { - state % 2 == 0 { - break; - } default: { - break L13; - } } - } - print(89); state = check();// ...................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(68); state = check();// ...................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - L18: while(1) { - print(51); state = check();// ............................................................................................. - switch (the_var) { - default: { } - } - L20: while(1) { - print(36); state = check();// ......................... + L13: while(1) { + print(75); state = check();// ............................................. switch (the_var) { - state % 2 == 0 { - break L20; - break; - } default: { } } - print(16); state = check();// ................................................................................................................................................................................................................................................................................................................................................................ + print(7); state = check();// ............................................................................................................................................................................................. switch (the_var) { - default: { - } + state % 2 == 0 { + break; } - print(57); state = check();// ........................................................................................................................................................................................................................................................................................................................... - switch (the_var) { default: { + break L13; } } - print(39); state = check();// ................ + } + print(89); state = check();// ...................................................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(68); state = check();// ...................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + L18: while(1) { + print(51); state = check();// ............................................................................................. switch (the_var) { - state % 3 == 0 { - break; - } - state % 3 == 1 { - label = 74; - break; - } default: { - label = 32; - break L20; } } - L25: while(1) { - if (label == 74) { - label = 0; - print(73); state = check();// . + L20: while(1) { + print(36); state = check();// ......................... + switch (the_var) { + state % 2 == 0 { + break L20; + break; + } + default: { + } + } + print(16); state = check();// ................................................................................................................................................................................................................................................................................................................................................................ + switch (the_var) { + default: { + } + } + print(57); state = check();// ........................................................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(39); state = check();// ................ + switch (the_var) { + state % 3 == 0 { + break; + } + state % 3 == 1 { + label = 74; + break; + } + default: { + label = 32; + break L20; + } + } + L25: while(1) { + if (label == 74) { + label = 0; + print(73); state = check();// . + switch (the_var) { + state % 3 == 1 { + label = 32; + break L20; + break; + } + state % 3 == 0 { + break L25; + break; + } + default: { + } + } + print(43); state = check();// ......... + switch (the_var) { + default: { + } + } + print(32); state = check();// ...................................................................................................... + switch (the_var) { + default: { + } + } + print(83); state = check();// ........................................................................................ + switch (the_var) { + default: { + } + } + print(77); state = check();// ........................................................................................................................................................................................................................................................................................... + switch (the_var) { + default: { + } + } + print(76); state = check();// .............................................................................................................................................................................................................................................................................................................................................................................................................................. + switch (the_var) { + default: { + } + } + print(22); state = check();// ......................................................................................................... + switch (the_var) { + default: { + } + } + } + print(72); state = check();// .......................................................................................................... switch (the_var) { - state % 3 == 1 { - label = 32; + state % 2 == 0 { + label = 92; break L20; break; } - state % 3 == 0 { - break L25; + default: { + } + } + print(80); state = check();// .................................... + switch (the_var) { + state % 2 == 0 { + continue L18; break; } default: { } } - print(43); state = check();// ......... + print(50); state = check();// ........................................ switch (the_var) { default: { } } - print(32); state = check();// ...................................................................................................... + print(29); state = check();// ............... switch (the_var) { default: { } } - print(83); state = check();// ........................................................................................ + print(8); state = check();// .................................................................................................................................................................................................................................................... switch (the_var) { + state % 2 == 0 { + continue L10; + break; + } default: { } } - print(77); state = check();// ........................................................................................................................................................................................................................................................................................... + print(19); state = check();// ...................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(76); state = check();// .............................................................................................................................................................................................................................................................................................................................................................................................................................. + print(56); state = check();// .................................................................................................................................................................................................................... switch (the_var) { default: { } } - print(22); state = check();// ......................................................................................................... + print(34); state = check();// .......................................................................................................................................... switch (the_var) { default: { + label = 74; } } } - print(72); state = check();// .......................................................................................................... - switch (the_var) { - state % 2 == 0 { - label = 92; - break L20; - break; - } - default: { - } - } - print(80); state = check();// .................................... - switch (the_var) { - state % 2 == 0 { - continue L18; - break; - } - default: { - } - } - print(50); state = check();// ........................................ - switch (the_var) { - default: { - } - } - print(29); state = check();// ............... - switch (the_var) { - default: { - } - } - print(8); state = check();// .................................................................................................................................................................................................................................................... + print(62); state = check();// ....................................................................................... switch (the_var) { - state % 2 == 0 { - continue L10; - break; - } default: { } } - print(19); state = check();// ...................................................................................................................................................................................................................... + } + if (label == 32) { + label = 0; + print(31); state = check();// .......................................................................................................................................................................................................... switch (the_var) { default: { } } - print(56); state = check();// .................................................................................................................................................................................................................... + } + else if (label == 92) { + label = 0; + print(91); state = check();// .............................................. switch (the_var) { default: { } } - print(34); state = check();// .......................................................................................................................................... + print(33); state = check();// .... switch (the_var) { default: { - label = 74; } } } - print(62); state = check();// ....................................................................................... + print(60); state = check();// ...................................................................................................................................................................................................................................... switch (the_var) { default: { } } - } - if (label == 32) { - label = 0; - print(31); state = check();// .......................................................................................................................................................................................................... + print(10); state = check();// ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... switch (the_var) { default: { } } - } - else if (label == 92) { - label = 0; - print(91); state = check();// .............................................. + print(52); state = check();// .............................................................................. switch (the_var) { + state % 2 == 0 { + break L10; + break; + } default: { } } - print(33); state = check();// .... + print(2); state = check();// ......... switch (the_var) { default: { } } } - print(60); state = check();// ...................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(10); state = check();// ................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... - switch (the_var) { - default: { - } - } - print(52); state = check();// .............................................................................. - switch (the_var) { - state % 2 == 0 { - break L10; - break; - } - default: { - } - } - print(2); state = check();// ......... - switch (the_var) { - default: { - } - } + } + print(61); state = check();// ......................................................................................................................................................... + switch (the_var) { + default: { + } } } - print(61); state = check();// ......................................................................................................................................................... - switch (the_var) { - default: { - } - } -} diff --git a/src/relooper/test_inf.txt b/src/relooper/test_inf.txt index 6db32edb..2acadbfb 100644 --- a/src/relooper/test_inf.txt +++ b/src/relooper/test_inf.txt @@ -1,1072 +1,1039 @@ -code 0 -switch (the_var) { -uint(i4) >= uint(i5) { - code 2 + code 0 switch (the_var) { - default: { - } - } - break; -} -default: { - code 1 - switch (the_var) { - default: { - } - } -} -} -code 3 -L5: do { - switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 2 + switch (the_var) { + default: { + } + } break; } default: { - code 4 + code 1 switch (the_var) { default: { } } - while(1) { - code 5 + } + } + code 3 + L5: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 4 switch (the_var) { - uint(i6) >= uint(i7) { - code 7 - switch (the_var) { - default: { - } - } - break; - } default: { - code 6 - switch (the_var) { - default: { - } - } } } - code 8 - switch (the_var) { - uint(i6) >= uint(i7) { - code 10 + while(1) { + code 5 switch (the_var) { + uint(i6) >= uint(i7) { + code 7 + switch (the_var) { + default: { + } + } + break; + } default: { + code 6 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 9 + code 8 switch (the_var) { + uint(i6) >= uint(i7) { + code 10 + switch (the_var) { + default: { + } + } + break; + } default: { + code 9 + switch (the_var) { + default: { + } + } } } - } - } - code 11 - switch (the_var) { - uint(i5) >= uint(i6) { - code 13 + code 11 switch (the_var) { + uint(i5) >= uint(i6) { + code 13 + switch (the_var) { + default: { + } + } + break; + } default: { + code 12 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 12 + code 14 switch (the_var) { + i2 != 0 { + break; + } default: { + break L5; } } } - } - code 14 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L5; - } - } } - } - } -} while(0); -code 15 -switch (the_var) { -uint(i4) >= uint(i5) { - code 17 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 16 - switch (the_var) { - default: { - } - } -} -} -code 18 -L26: do { + } + } while(0); + code 15 switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 17 + switch (the_var) { + default: { + } + } break; } default: { - code 19 + code 16 switch (the_var) { default: { } } - while(1) { - code 20 + } + } + code 18 + L26: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 19 switch (the_var) { - uint(i5) >= uint(i6) { - code 22 - switch (the_var) { - default: { - } - } - break; - } default: { - code 21 - switch (the_var) { - default: { - } - } } } - code 23 - switch (the_var) { - uint(i5) >= uint(i6) { - code 25 + while(1) { + code 20 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 22 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 24 - switch (the_var) { default: { + code 21 + switch (the_var) { + default: { + } + } } } - } - } - code 26 - switch (the_var) { - uint(i5) >= uint(i6) { - code 28 + code 23 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 25 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 27 - switch (the_var) { default: { + code 24 + switch (the_var) { + default: { + } + } } } - } - } - code 29 - switch (the_var) { - uint(i5) >= uint(i6) { - code 31 + code 26 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 28 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 30 - switch (the_var) { default: { + code 27 + switch (the_var) { + default: { + } + } } } - } - } - code 32 - switch (the_var) { - uint(i5) >= uint(i6) { - code 34 + code 29 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 31 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 33 - switch (the_var) { default: { + code 30 + switch (the_var) { + default: { + } + } } } - } - } - code 35 - switch (the_var) { - uint(i5) >= uint(i6) { - code 37 + code 32 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 34 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 36 - switch (the_var) { default: { + code 33 + switch (the_var) { + default: { + } + } } } - } - } - code 38 - switch (the_var) { - uint(i5) >= uint(i6) { - code 40 + code 35 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 37 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 39 - switch (the_var) { default: { + code 36 + switch (the_var) { + default: { + } + } } } - } - } - code 41 - switch (the_var) { - uint(i5) >= uint(i6) { - code 43 + code 38 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 40 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 42 - switch (the_var) { default: { + code 39 + switch (the_var) { + default: { + } + } } } - } - } - code 44 - switch (the_var) { - uint(i5) >= uint(i6) { - code 46 + code 41 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 43 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 45 - switch (the_var) { default: { + code 42 + switch (the_var) { + default: { + } + } } } - } - } - code 47 - switch (the_var) { - uint(i5) >= uint(i6) { - code 49 + code 44 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 46 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 48 - switch (the_var) { default: { + code 45 + switch (the_var) { + default: { + } + } } } - } - } - code 50 - switch (the_var) { - uint(i5) >= uint(i6) { - code 52 + code 47 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 49 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 51 - switch (the_var) { default: { + code 48 + switch (the_var) { + default: { + } + } } } - } - } - code 53 - switch (the_var) { - uint(i5) >= uint(i6) { - code 55 + code 50 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 52 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 54 - switch (the_var) { default: { + code 51 + switch (the_var) { + default: { + } + } } } - } - } - code 56 - switch (the_var) { - uint(i5) >= uint(i6) { - code 58 + code 53 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 55 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 57 - switch (the_var) { default: { + code 54 + switch (the_var) { + default: { + } + } } } - } - } - code 59 - switch (the_var) { - uint(i5) >= uint(i6) { - code 61 + code 56 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 58 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 60 - switch (the_var) { default: { + code 57 + switch (the_var) { + default: { + } + } } } - } - } - code 62 - switch (the_var) { - uint(i5) >= uint(i6) { - code 64 + code 59 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 61 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 63 - switch (the_var) { default: { + code 60 + switch (the_var) { + default: { + } + } } } - } - } - code 65 - switch (the_var) { - uint(i5) >= uint(i6) { - code 67 + code 62 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 64 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 66 - switch (the_var) { default: { + code 63 + switch (the_var) { + default: { + } + } } } - } - } - code 68 - switch (the_var) { - uint(i5) >= uint(i6) { - code 70 + code 65 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 67 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 69 - switch (the_var) { default: { + code 66 + switch (the_var) { + default: { + } + } } } - } - } - code 71 - switch (the_var) { - uint(i5) >= uint(i6) { - code 73 + code 68 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 70 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 72 - switch (the_var) { default: { + code 69 + switch (the_var) { + default: { + } + } } } - } - } - code 74 - switch (the_var) { - uint(i5) >= uint(i6) { - code 76 + code 71 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 73 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 75 - switch (the_var) { default: { + code 72 + switch (the_var) { + default: { + } + } } } - } - } - code 77 - switch (the_var) { - uint(i5) >= uint(i6) { - code 79 + code 74 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 76 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 78 - switch (the_var) { default: { + code 75 + switch (the_var) { + default: { + } + } } } - } - } - code 80 - switch (the_var) { - uint(i5) >= uint(i6) { - code 82 + code 77 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 79 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 81 - switch (the_var) { default: { + code 78 + switch (the_var) { + default: { + } + } } } - } - } - code 83 - switch (the_var) { - uint(i5) >= uint(i6) { - code 85 + code 80 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 82 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 84 - switch (the_var) { default: { + code 81 + switch (the_var) { + default: { + } + } } } - } - } - code 86 - switch (the_var) { - uint(i5) >= uint(i6) { - code 88 + code 83 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 85 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 87 - switch (the_var) { default: { + code 84 + switch (the_var) { + default: { + } + } } } - } - } - code 89 - switch (the_var) { - uint(i5) >= uint(i6) { - code 91 + code 86 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 88 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 90 - switch (the_var) { default: { + code 87 + switch (the_var) { + default: { + } + } } } - } - } - code 92 - switch (the_var) { - uint(i5) >= uint(i6) { - code 94 + code 89 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 91 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 93 - switch (the_var) { default: { + code 90 + switch (the_var) { + default: { + } + } } } - } - } - code 95 - switch (the_var) { - uint(i5) >= uint(i6) { - code 97 + code 92 switch (the_var) { + uint(i5) >= uint(i6) { + code 94 + switch (the_var) { + default: { + } + } + break; + } default: { + code 93 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 96 + code 95 switch (the_var) { + uint(i5) >= uint(i6) { + code 97 + switch (the_var) { + default: { + } + } + break; + } default: { + code 96 + switch (the_var) { + default: { + } + } } } - } - } - code 98 - switch (the_var) { - uint(i5) >= uint(i6) { - code 100 + code 98 switch (the_var) { + uint(i5) >= uint(i6) { + code 100 + switch (the_var) { + default: { + } + } + break; + } default: { + code 99 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 99 + code 101 switch (the_var) { + i2 != 0 { + break; + } default: { + break L26; } } } - } - code 101 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L26; - } - } } - } - } -} while(0); -code 102 -switch (the_var) { -uint(i4) >= uint(i5) { - code 104 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 103 - switch (the_var) { - default: { - } - } -} -} -code 105 -L143: do { + } + } while(0); + code 102 switch (the_var) { - i2 == 0 { + uint(i4) >= uint(i5) { + code 104 + switch (the_var) { + default: { + } + } break; } default: { - code 106 + code 103 switch (the_var) { default: { } } - while(1) { - code 107 + } + } + code 105 + L143: do { + switch (the_var) { + i2 == 0 { + break; + } + default: { + code 106 switch (the_var) { - uint(i5) >= uint(i6) { - code 109 - switch (the_var) { - default: { - } - } - break; - } default: { - code 108 - switch (the_var) { - default: { - } - } } } - code 110 - switch (the_var) { - uint(i5) >= uint(i6) { - code 112 + while(1) { + code 107 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 109 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 111 - switch (the_var) { default: { + code 108 + switch (the_var) { + default: { + } + } } } - } - } - code 113 - switch (the_var) { - uint(i5) >= uint(i6) { - code 115 + code 110 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 112 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 114 - switch (the_var) { default: { + code 111 + switch (the_var) { + default: { + } + } } } - } - } - code 116 - switch (the_var) { - uint(i5) >= uint(i6) { - code 118 + code 113 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 115 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 117 - switch (the_var) { default: { + code 114 + switch (the_var) { + default: { + } + } } } - } - } - code 119 - switch (the_var) { - uint(i5) >= uint(i6) { - code 121 + code 116 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 118 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 120 - switch (the_var) { default: { + code 117 + switch (the_var) { + default: { + } + } } } - } - } - code 122 - switch (the_var) { - uint(i5) >= uint(i6) { - code 124 + code 119 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 121 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 123 - switch (the_var) { default: { + code 120 + switch (the_var) { + default: { + } + } } } - } - } - code 125 - switch (the_var) { - uint(i5) >= uint(i6) { - code 127 + code 122 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 124 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 126 - switch (the_var) { default: { + code 123 + switch (the_var) { + default: { + } + } } } - } - } - code 128 - switch (the_var) { - uint(i5) >= uint(i6) { - code 130 + code 125 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 127 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 129 - switch (the_var) { default: { + code 126 + switch (the_var) { + default: { + } + } } } - } - } - code 131 - switch (the_var) { - uint(i5) >= uint(i6) { - code 133 + code 128 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 130 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 132 - switch (the_var) { default: { + code 129 + switch (the_var) { + default: { + } + } } } - } - } - code 134 - switch (the_var) { - uint(i5) >= uint(i6) { - code 136 + code 131 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 133 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 135 - switch (the_var) { default: { + code 132 + switch (the_var) { + default: { + } + } } } - } - } - code 137 - switch (the_var) { - uint(i5) >= uint(i6) { - code 139 + code 134 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 136 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 138 - switch (the_var) { default: { + code 135 + switch (the_var) { + default: { + } + } } } - } - } - code 140 - switch (the_var) { - uint(i5) >= uint(i6) { - code 142 + code 137 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 139 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 141 - switch (the_var) { default: { + code 138 + switch (the_var) { + default: { + } + } } } - } - } - code 143 - switch (the_var) { - uint(i5) >= uint(i6) { - code 145 + code 140 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 142 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 144 - switch (the_var) { default: { + code 141 + switch (the_var) { + default: { + } + } } } - } - } - code 146 - switch (the_var) { - uint(i5) >= uint(i6) { - code 148 + code 143 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 145 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 147 - switch (the_var) { default: { + code 144 + switch (the_var) { + default: { + } + } } } - } - } - code 149 - switch (the_var) { - uint(i5) >= uint(i6) { - code 151 + code 146 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 148 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 150 - switch (the_var) { default: { + code 147 + switch (the_var) { + default: { + } + } } } - } - } - code 152 - switch (the_var) { - uint(i5) >= uint(i6) { - code 154 + code 149 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 151 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 153 - switch (the_var) { default: { + code 150 + switch (the_var) { + default: { + } + } } } - } - } - code 155 - switch (the_var) { - uint(i5) >= uint(i6) { - code 157 + code 152 switch (the_var) { - default: { + uint(i5) >= uint(i6) { + code 154 + switch (the_var) { + default: { + } + } + break; } - } - break; - } - default: { - code 156 - switch (the_var) { default: { + code 153 + switch (the_var) { + default: { + } + } } } - } - } - code 158 - switch (the_var) { - uint(i5) >= uint(i6) { - code 160 + code 155 switch (the_var) { - default: { - } + uint(i5) >= uint(i6) { + code 157 + switch (the_var) { + default: { + } + } + break; } - break; - } - default: { - code 159 - switch (the_var) { default: { + code 156 + switch (the_var) { + default: { + } + } } } - } - } - code 161 - switch (the_var) { - uint(i5) >= uint(i6) { - code 163 + code 158 switch (the_var) { + uint(i5) >= uint(i6) { + code 160 + switch (the_var) { + default: { + } + } + break; + } default: { + code 159 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 162 + code 161 switch (the_var) { + uint(i5) >= uint(i6) { + code 163 + switch (the_var) { + default: { + } + } + break; + } default: { + code 162 + switch (the_var) { + default: { + } + } } } - } - } - code 164 - switch (the_var) { - uint(i5) >= uint(i6) { - code 166 + code 164 switch (the_var) { + uint(i5) >= uint(i6) { + code 166 + switch (the_var) { + default: { + } + } + break; + } default: { + code 165 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 165 + code 167 switch (the_var) { + i2 != 0 { + break; + } default: { + break L143; } } } - } - code 167 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L143; - } - } } - } - } -} while(0); -code 168 -switch (the_var) { -uint(i4) >= uint(i5) { - code 170 - switch (the_var) { - default: { - } - } - break; -} -default: { - code 169 - switch (the_var) { - default: { - } - } -} -} -code 171 -switch (the_var) { -i2 == 0 { - code 183 - break; -} -default: { -} -} -code 172 -switch (the_var) { -default: { -} -} -L235: while(1) { - code 173 + } + } while(0); + code 168 switch (the_var) { - uint(i5) >= uint(i6) { - code 175 + uint(i4) >= uint(i5) { + code 170 switch (the_var) { default: { } @@ -1074,58 +1041,91 @@ L235: while(1) { break; } default: { - code 174 + code 169 switch (the_var) { default: { } } } } - code 176 + code 171 + switch (the_var) { + i2 == 0 { + code 183 + break; + } + default: { + } + } + code 172 switch (the_var) { - uint(i5) >= uint(i6) { - code 178 + default: { + } + } + L235: while(1) { + code 173 switch (the_var) { + uint(i5) >= uint(i6) { + code 175 + switch (the_var) { + default: { + } + } + break; + } default: { + code 174 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 177 + code 176 switch (the_var) { + uint(i5) >= uint(i6) { + code 178 + switch (the_var) { + default: { + } + } + break; + } default: { + code 177 + switch (the_var) { + default: { + } + } } } - } - } - code 179 - switch (the_var) { - uint(i4) >= uint(i5) { - code 181 + code 179 switch (the_var) { + uint(i4) >= uint(i5) { + code 181 + switch (the_var) { + default: { + } + } + break; + } default: { + code 180 + switch (the_var) { + default: { + } + } } } - break; - } - default: { - code 180 + code 182 switch (the_var) { + i2 != 0 { + break; + } default: { + break L235; } } } - } - code 182 - switch (the_var) { - i2 != 0 { - break; - } - default: { - break L235; - } - } -} -code 183 + code 183 diff --git a/tools/shared.py b/tools/shared.py index 20951a12..eb1c63be 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -322,7 +322,7 @@ def find_temp_directory(): # we re-check sanity when the settings are changed) # We also re-check sanity and clear the cache when the version changes -EMSCRIPTEN_VERSION = '1.7.9' +EMSCRIPTEN_VERSION = '1.8.0' def generate_sanity(): return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT |