2009-08-09 17:29:21 -04:00
|
|
|
USING: compiler.tree.escape-analysis.check tools.test accessors kernel
|
|
|
|
kernel.private math compiler.tree.builder compiler.tree.normalization
|
|
|
|
compiler.tree.propagation compiler.tree.cleanup ;
|
2009-08-13 20:21:44 -04:00
|
|
|
IN: compiler.tree.escape-analysis.check.tests
|
2009-08-09 17:29:21 -04:00
|
|
|
|
|
|
|
: test-checker ( quot -- ? )
|
2015-06-06 02:18:43 -04:00
|
|
|
build-tree normalize propagate cleanup-tree run-escape-analysis? ;
|
2009-08-09 17:29:21 -04:00
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ t } [
|
2009-08-09 17:29:21 -04:00
|
|
|
[ { complex } declare [ real>> ] [ imaginary>> ] bi ]
|
|
|
|
test-checker
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ t } [
|
2009-08-09 17:29:21 -04:00
|
|
|
[ complex boa [ real>> ] [ imaginary>> ] bi ]
|
|
|
|
test-checker
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ t } [
|
2009-08-09 17:29:21 -04:00
|
|
|
[ [ complex boa [ real>> ] [ imaginary>> ] bi ] when ]
|
|
|
|
test-checker
|
|
|
|
] unit-test
|
|
|
|
|
2015-07-03 12:39:59 -04:00
|
|
|
{ f } [
|
2009-08-09 17:29:21 -04:00
|
|
|
[ swap 1 2 ? ]
|
|
|
|
test-checker
|
2009-08-13 20:21:44 -04:00
|
|
|
] unit-test
|