From bcbc7632c60680b014d9943f7ac7e3be91e058f6 Mon Sep 17 00:00:00 2001 From: Joe Groff <arcata@gmail.com> Date: Mon, 8 Mar 2010 23:46:20 -0800 Subject: [PATCH] fix stack effects in compiler tests --- basis/compiler/tests/curry.factor | 2 +- basis/compiler/tests/optimizer.factor | 2 +- basis/compiler/tree/dead-code/dead-code-tests.factor | 2 +- basis/compiler/tree/normalization/normalization-tests.factor | 2 +- .../compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/basis/compiler/tests/curry.factor b/basis/compiler/tests/curry.factor index ddbd9ba646..4f38cd8290 100644 --- a/basis/compiler/tests/curry.factor +++ b/basis/compiler/tests/curry.factor @@ -32,7 +32,7 @@ IN: compiler.tests.curry compile-call ] unit-test -: foobar ( quot: ( -- ) -- ) +: foobar ( quot: ( ..a -- ..b ) -- ) [ call ] keep swap [ foobar ] [ drop ] if ; inline recursive [ ] [ [ [ f ] foobar ] compile-call ] unit-test diff --git a/basis/compiler/tests/optimizer.factor b/basis/compiler/tests/optimizer.factor index fe67cbbc37..2e305b2c39 100644 --- a/basis/compiler/tests/optimizer.factor +++ b/basis/compiler/tests/optimizer.factor @@ -198,7 +198,7 @@ USE: sorting USE: binary-search USE: binary-search.private -: old-binsearch ( elt quot: ( -- ) seq -- elt quot i ) +: old-binsearch ( elt quot: ( ..a -- ..b ) seq -- elt quot i ) dup length 1 <= [ from>> ] [ diff --git a/basis/compiler/tree/dead-code/dead-code-tests.factor b/basis/compiler/tree/dead-code/dead-code-tests.factor index d859096e1d..afdd8fed4e 100644 --- a/basis/compiler/tree/dead-code/dead-code-tests.factor +++ b/basis/compiler/tree/dead-code/dead-code-tests.factor @@ -168,7 +168,7 @@ IN: compiler.tree.dead-code.tests [ ] [ [ [ 0 -rot set-nth-unsafe ] curry (each-integer) ] optimize-quot drop ] unit-test -: call-recursive-dce-6 ( i quot: ( i -- ? ) -- i ) +: call-recursive-dce-6 ( i quot: ( ..a -- ..b ) -- i ) dup call [ drop ] [ call-recursive-dce-6 ] if ; inline recursive [ ] [ [ [ ] curry [ ] swap compose call-recursive-dce-6 ] optimize-quot drop ] unit-test diff --git a/basis/compiler/tree/normalization/normalization-tests.factor b/basis/compiler/tree/normalization/normalization-tests.factor index 19669c2239..2f250fcf08 100644 --- a/basis/compiler/tree/normalization/normalization-tests.factor +++ b/basis/compiler/tree/normalization/normalization-tests.factor @@ -14,7 +14,7 @@ IN: compiler.tree.normalization.tests [ 2 ] [ [ 3 [ drop ] [ 2drop 3 ] if ] build-tree count-introductions ] unit-test -: foo ( quot: ( -- ) -- ) call ; inline recursive +: foo ( ..a quot: ( ..a -- ..b ) -- ..b ) call ; inline recursive : recursive-inputs ( nodes -- n ) [ #recursive? ] find nip child>> first in-d>> length ; diff --git a/basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor b/basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor index d73368867d..e6d42f0289 100644 --- a/basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor +++ b/basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor @@ -38,10 +38,10 @@ TUPLE: empty-tuple ; } [ [ ] swap [ test-unboxing ] curry unit-test ] each ! A more complicated example -: impeach-node ( quot: ( node -- ) -- ) +: impeach-node ( quot: ( ..a -- ..b ) -- ) [ call ] keep impeach-node ; inline recursive -: bleach-node ( quot: ( node -- ) -- ) +: bleach-node ( quot: ( ..a -- ..b ) -- ) [ bleach-node ] curry [ ] compose impeach-node ; inline recursive [ ] [ [ [ ] bleach-node ] test-unboxing ] unit-test