factor/library/test/compiler/optimizer.factor

36 lines
834 B
Factor
Raw Normal View History

IN: temporary
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
USE: compiler-frontend
2004-12-05 21:17:09 -05:00
USE: inference
USE: words
USE: math
USE: kernel
2004-12-19 22:53:41 -05:00
USE: lists
USE: sequences
2004-12-05 21:17:09 -05:00
: foo 1 2 3 ;
[ [ ] ] [ \ foo word-def dataflow kill-set ] unit-test
[ [ [ 1 ] [ 2 ] ] ] [ [ [ 1 ] [ 2 ] ifte ] dataflow kill-set ] unit-test
[ [ [ 1 ] [ 2 ] ] ] [ [ [ 1 ] [ 2 ] ifte ] dataflow kill-set ] unit-test
[ [ t t f ] ] [ [ 1 2 ] [ 1 2 3 ] [ f <literal> ] map kill-mask ] unit-test
2005-01-17 15:33:12 -05:00
[ t ] [ 3 [ 3 over [ ] [ ] ifte drop ] dataflow kill-set contains? ] 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