Add some compiler tests
parent
1878b0dc32
commit
cb07256ff5
|
@ -333,4 +333,16 @@ cell 4 = [
|
|||
] if
|
||||
] any? ; inline recursive
|
||||
|
||||
[ t ] [ 3 [ return-recursive-bug ] compile-call ] unit-test
|
||||
[ t ] [ 3 [ return-recursive-bug ] compile-call ] unit-test
|
||||
|
||||
! Coalescing reductions
|
||||
[ f ] [ V{ } 0 [ [ vector? ] both? ] compile-call ] unit-test
|
||||
[ f ] [ 0 V{ } [ [ vector? ] both? ] compile-call ] unit-test
|
||||
|
||||
[ f ] [
|
||||
f vector [
|
||||
[ dup [ \ vector eq? ] [ drop f ] if ] dip
|
||||
dup [ \ vector eq? ] [ drop f ] if
|
||||
over rot [ drop ] [ nip ] if
|
||||
] compile-call
|
||||
] unit-test
|
|
@ -111,6 +111,13 @@ IN: compiler.tests
|
|||
} compile-test-bb
|
||||
] unit-test
|
||||
|
||||
[ 1 ] [
|
||||
V{
|
||||
T{ ##load-immediate f V int-regs 0 16 }
|
||||
T{ ##add-imm f V int-regs 0 V int-regs 0 -8 }
|
||||
} compile-test-bb
|
||||
] unit-test
|
||||
|
||||
! These are def-is-use-insns
|
||||
USE: multiline
|
||||
|
||||
|
|
Loading…
Reference in New Issue