This PR sets up the new integrated test/bench suite. It then migrates all benchmarks and some related tests to the new suite. There's also some documentation and some linting. For now, a lot of the old tests are left alone so this PR doesn't become even larger than it already is. Eventually, all tests should be migrated to the new suite though so there isn't a confusing mix of two systems.
22 lines
573 B
Text
22 lines
573 B
Text
-- Type has trivial structure, so `u64` representation is expected.
|
|
structure Unboxed where val : UInt64
|
|
|
|
structure S where
|
|
unboxed : Unboxed
|
|
unused : Bool
|
|
|
|
/--
|
|
trace: [Compiler.IR] [result]
|
|
def get_unboxed (x_1 : obj) : u64 :=
|
|
let x_2 : u64 := sproj[0, 0] x_1;
|
|
dec x_1;
|
|
ret x_2
|
|
def get_unboxed._boxed (x_1 : obj) : obj :=
|
|
let x_2 : u64 := get_unboxed x_1;
|
|
let x_3 : obj := box x_2;
|
|
ret x_3
|
|
-/
|
|
#guard_msgs in
|
|
set_option trace.compiler.ir.result true in
|
|
@[export get_unboxed]
|
|
def get_unboxed (s : S) : UInt64 := s.unboxed.val
|