2005-03-28 23:45:13 -05:00
|
|
|
IN: temporary
|
2005-08-01 16:22:53 -04:00
|
|
|
USING: generic kernel-internals strings vectors ;
|
2004-12-05 21:17:09 -05:00
|
|
|
USE: test
|
2005-05-15 21:17:56 -04:00
|
|
|
USE: assembler
|
2004-12-05 21:17:09 -05:00
|
|
|
USE: compiler
|
2005-05-09 23:27:46 -04:00
|
|
|
USE: compiler-frontend
|
2004-12-05 21:17:09 -05:00
|
|
|
USE: inference
|
|
|
|
USE: words
|
|
|
|
USE: math
|
2004-12-10 19:29:07 -05:00
|
|
|
USE: kernel
|
2004-12-19 22:53:41 -05:00
|
|
|
USE: lists
|
2005-05-09 23:27:46 -04:00
|
|
|
USE: sequences
|
2004-12-05 21:17:09 -05:00
|
|
|
|
2005-05-22 21:07:24 -04:00
|
|
|
: kill-set*
|
|
|
|
dataflow kill-set [ literal-value ] map ;
|
|
|
|
|
2004-12-05 21:17:09 -05:00
|
|
|
: foo 1 2 3 ;
|
|
|
|
|
2005-03-05 14:45:23 -05:00
|
|
|
[ [ ] ] [ \ foo word-def dataflow kill-set ] unit-test
|
2005-01-14 12:01:48 -05:00
|
|
|
|
2005-05-22 21:07:24 -04:00
|
|
|
[ [ [ 1 ] [ 2 ] ] ] [ [ [ 1 ] [ 2 ] ifte ] kill-set* ] unit-test
|
2005-01-14 12:01:48 -05:00
|
|
|
|
2005-05-22 21:07:24 -04:00
|
|
|
[ [ [ 1 ] [ 2 ] ] ] [ [ [ 1 ] [ 2 ] ifte ] kill-set* ] unit-test
|
2005-01-14 12:01:48 -05:00
|
|
|
|
2005-07-25 01:04:33 -04:00
|
|
|
[ [ t t f ] ] [
|
|
|
|
[ 1 2 3 ] [ f <literal> ] map
|
|
|
|
[ [ literal-value 2 <= ] subset ] keep in-d-node <#drop> kill-mask
|
2005-05-22 21:07:24 -04:00
|
|
|
] unit-test
|
2005-01-17 15:33:12 -05:00
|
|
|
|
2005-05-22 21:07:24 -04:00
|
|
|
[ t ] [
|
|
|
|
3 [ 3 over [ ] [ ] ifte drop ] dataflow
|
2005-07-16 22:16:18 -04:00
|
|
|
kill-set [ value= ] contains-with?
|
2005-05-22 21:07:24 -04:00
|
|
|
] unit-test
|
2005-05-15 21:17:56 -04:00
|
|
|
|
|
|
|
: literal-kill-test-1 4 compiled-offset cell 2 * - ; compiled
|
|
|
|
|
|
|
|
[ 4 ] [ literal-kill-test-1 drop ] unit-test
|
|
|
|
|
|
|
|
: literal-kill-test-2 3 compiled-offset cell 2 * - ; compiled
|
|
|
|
|
|
|
|
[ 3 ] [ literal-kill-test-2 drop ] unit-test
|
|
|
|
|
|
|
|
: literal-kill-test-3 10 3 /mod drop ; compiled
|
|
|
|
|
|
|
|
[ 3 ] [ literal-kill-test-3 ] unit-test
|
2005-05-22 21:07:24 -04:00
|
|
|
|
|
|
|
[ [ [ 3 ] [ dup ] ] ] [ [ [ 3 ] [ dup ] ifte drop ] kill-set* ] unit-test
|
|
|
|
|
|
|
|
: literal-kill-test-4
|
|
|
|
5 swap [ 3 ] [ dup ] ifte 2drop ; compiled
|
|
|
|
|
|
|
|
[ ] [ t literal-kill-test-4 ] unit-test
|
|
|
|
[ ] [ f literal-kill-test-4 ] unit-test
|
|
|
|
|
|
|
|
[ [ [ 3 ] [ dup ] ] ] [ \ literal-kill-test-4 word-def kill-set* ] unit-test
|
|
|
|
|
|
|
|
: literal-kill-test-5
|
|
|
|
5 swap [ 5 ] [ dup ] ifte 2drop ; compiled
|
|
|
|
|
|
|
|
[ ] [ t literal-kill-test-5 ] unit-test
|
|
|
|
[ ] [ f literal-kill-test-5 ] unit-test
|
|
|
|
|
|
|
|
[ [ [ 5 ] [ dup ] ] ] [ \ literal-kill-test-5 word-def kill-set* ] unit-test
|
|
|
|
|
|
|
|
: literal-kill-test-6
|
|
|
|
5 swap [ dup ] [ dup ] ifte 2drop ; compiled
|
|
|
|
|
|
|
|
[ ] [ t literal-kill-test-6 ] unit-test
|
|
|
|
[ ] [ f literal-kill-test-6 ] unit-test
|
|
|
|
|
|
|
|
[ [ 5 [ dup ] [ dup ] ] ] [ \ literal-kill-test-6 word-def kill-set* ] unit-test
|
|
|
|
|
2005-07-25 01:04:33 -04:00
|
|
|
: literal-kill-test-7
|
|
|
|
[ 1 2 3 ] >r + r> drop ; compiled
|
|
|
|
|
|
|
|
[ 4 ] [ 2 2 literal-kill-test-7 ] unit-test
|
2005-08-01 16:22:53 -04:00
|
|
|
|
|
|
|
[ t ] [
|
|
|
|
\ string
|
|
|
|
[ range repeated integer string mirror array reversed sbuf
|
|
|
|
slice vector diagonal general-list ]
|
|
|
|
min-class?
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ f ] [
|
|
|
|
\ fixnum
|
|
|
|
[ fixnum integer letter ]
|
|
|
|
min-class?
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ t ] [
|
|
|
|
\ fixnum
|
|
|
|
[ fixnum integer object ]
|
|
|
|
min-class?
|
|
|
|
] unit-test
|
|
|
|
|
|
|
|
[ f ] [
|
|
|
|
\ fixnum
|
|
|
|
[ integer object ]
|
|
|
|
min-class?
|
|
|
|
] unit-test
|