Skip to content

Commit

Permalink
[compiler-v2] Adding full compiler pipeline to many test configs (#12831
Browse files Browse the repository at this point in the history
)

* Adding full compiler pass to no-simplifier tests

* Adding full compiler pass for inline-et-al

* Adding full compiler pipeline to "simplifier-full"

* Adding full compiler pipeline to "ability-check".

* Adding full compiler pipeline to "unreachable-code" tests

* Removing turning off ability check from unreachable code.

* Adding full compiler pipeline to "unit-test-on" tests.

* Adding entire compiler pipeline to "unit-test-off".

* Adding full compiler pipeline to "skip-attribute-checks".
  • Loading branch information
vineethk authored Apr 10, 2024
1 parent 3d4e63c commit d7c50d7
Show file tree
Hide file tree
Showing 103 changed files with 366 additions and 536 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ warning: Unused parameter `x`. Consider removing or prefixing with an underscore
6 │ fun unused_arg<T: drop>(x: T) {
│ ^


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ module 0xcafe::vectors {
}
}
} // end 0xcafe::vectors


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ module 0xcafe::vectors {
}
}
} // end 0xcafe::vectors


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ module 0xcafe::vectors {
Tuple()
}
} // end 0xcafe::vectors


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ module 0xcafe::vectors {
}
}
} // end 0xcafe::vectors


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ module 0x42::Test {
625
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ module 0xc0ffee::dummy2 {
1
}
} // end 0xc0ffee::dummy2


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ module 0x42::LambdaTest {
Tuple()
}
} // end 0x42::LambdaTest


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ module 0x12391283::M {
}
}
} // end 0x12391283::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ module 0x42::OrderSensitiveTest3 {
}))
}
} // end 0x42::OrderSensitiveTest3


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ module 0x42::token {
})
}
} // end 0x42::token


Diagnostics:
bug: struct not defined
┌─ tests/checking/inlining/resources_invalid.move:17:16
17 │ public fun get_value(ref: &obj::ReaderRef<Token>): u64 acquires Token {
│ ^^^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,6 @@ module 0x42::Test {
}
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ module 0x42::Test {
}
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@ module 0x42::Test {
}
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ module 0x42::Test {
}
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ module 0x1::Test {
}
}
} // end 0x1::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ module 0xc0ffee::m {
}
}
} // end 0xc0ffee::m


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ module 0x8675309::M {
1
}
} // end 0x8675309::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ module 0x42::M {
Vector<vector<M::S>>()
}
} // end 0x42::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ module 0xcafe::Ristretto {
}
}
} // end 0xcafe::Ristretto


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ module 0xc0ffee::m {
}
}
} // end 0xc0ffee::m


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ module 0xc0ffee::m {
0
}
} // end 0xc0ffee::m


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ module 0x8675309::M {
}
}
} // end 0x8675309::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ module 0x8675309::M {
}
}
} // end 0x8675309::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ module <SELF>_0 {
Tuple()
}
} // end <SELF>_0


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ module <SELF>_0 {
}
}
} // end <SELF>_0


Diagnostics:
error: use of possibly unassigned local `y`
┌─ tests/simplifier-elimination/else_assigns_if_doesnt.move:11:13
11 │ assert!(y == 0, 42);
│ ^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ module <SELF>_0 {
}
}
} // end <SELF>_0


Diagnostics:
error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/if_assigns_else_doesnt.move:11:13
11 │ assert!(x == 42, 42);
│ ^^^^^^^
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ module <SELF>_0 {
}
}
} // end <SELF>_0


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ module 0x8675309::M {
Tuple()
}
} // end 0x8675309::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ module 0x42::test {
Tuple()
}
} // end 0x42::test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,11 @@ module <SELF>_0 {
}
}
} // end <SELF>_0


Diagnostics:
error: use of unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign.move:4:13
4 │ let y = x;
│ ^
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,35 @@ module 0x8675309::M {
}
}
} // end 0x8675309::M


Diagnostics:
error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_loop.move:4:24
4 │ loop { let y = move x + 1; x = 0; y; }
│ ^^^^^^

error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_loop.move:9:24
9 │ loop { let y = x + 1; if (cond) { continue }; x = 0; y; }
│ ^^^^^

error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_loop.move:14:24
14 │ loop { let y = &x; _ = move y; x = 0 }
│ ^^

error: use of unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_loop.move:19:24
19 │ loop { let y = &x; _ = move y; if (cond) { x = 0 }; break };
│ ^^

error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_loop.move:20:9
20 │ x;
│ ^
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,32 @@ module 0x8675309::M {
} // end 0x8675309::M


Diagnostics:
error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_while.move:4:32
4 │ while (cond) { let y = move x + 1; x = 0; y; }
│ ^^^^^^

error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_while.move:9:32
9 │ while (cond) { let y = move x + 1; if (cond) { continue }; x = 0; y; }
│ ^^^^^^

error: use of possibly unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_while.move:14:32
14 │ while (cond) { let y = &x; _ = move y; x = 0 }
│ ^^

error: use of unassigned local `x`
┌─ tests/simplifier-elimination/use_before_assign_while.move:19:32
19 │ while (cond) { let y = &x; _ = move y; if (cond) { x = 0 }; break }
│ ^^


Diagnostics:
error: cannot move local `x` since it is still in use
┌─ tests/simplifier-elimination/use_before_assign_while.move:9:32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@ module 0xcafe::vectors {
}
}
} // end 0xcafe::vectors


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,6 @@ module 0x8675::M {
Add<u64>(M::test1b(pack M::S(7)), M::test1b(pack M::S(2)))
}
} // end 0x8675::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ module 0xcafe::Ristretto {
Tuple()
}
} // end 0xcafe::Ristretto


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ module 0x42::Test {
625
}
} // end 0x42::Test


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ module 0x8675::M {
}
}
} // end 0x8675::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ module 0x8675::M {
}
}
} // end 0x8675::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ module 0x8675::M {
}
}
} // end 0x8675::M


============ bytecode verification succeeded ========
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

============ bytecode verification succeeded ========
Loading

0 comments on commit d7c50d7

Please sign in to comment.