]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix remaining text failures
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 24 Feb 2009 05:25:13 +0000 (23:25 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Tue, 24 Feb 2009 05:25:13 +0000 (23:25 -0600)
basis/compiler/compiler.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tests/simple.factor
basis/compiler/tree/cleanup/cleanup-tests.factor
basis/compiler/tree/recursive/recursive-tests.factor
basis/tools/profiler/profiler-tests.factor

index d707dff983911f1f3fb2a9d6569d5cfbe7847cfa..f2f4e7aa9e5c65b73bc55676a7c26b49d3d7da39 100644 (file)
@@ -49,7 +49,7 @@ SYMBOL: +failed+
     H{ } clone generic-dependencies set
     f swap compiler-error ;
 
-: fail ( word error -- )
+: fail ( word error -- )
     [ swap compiler-error ]
     [
         drop
@@ -112,9 +112,6 @@ t compile-dependencies? set-global
 : decompile ( word -- )
     f 2array 1array modify-code-heap ;
 
-: compile-call ( quot -- )
-    [ dup infer define-temp ] with-compilation-unit execute ;
-
 : optimized-recompile-hook ( words -- alist )
     [
         <hashed-dlist> compile-queue set
index 708d17f3d3cd14f7ec57a61ce4f00f0fc90241ef..cfeb5d01ac4360735c4662d07522ef4b441a5b1f 100644 (file)
@@ -55,7 +55,7 @@ TUPLE: pred-test ;
 
 ! regression
 
-: literal-not-branch 0 not [ ] [ ] if ;
+: literal-not-branch ( -- ) 0 not [ ] [ ] if ;
 
 [ ] [ literal-not-branch ] unit-test
 
@@ -108,12 +108,12 @@ GENERIC: void-generic ( obj -- * )
 [ 10 ] [ branch-fold-regression-1 ] unit-test
 
 ! another regression
-: constant-branch-fold-0 "hey" ; foldable
+: constant-branch-fold-0 ( -- value ) "hey" ; foldable
 : constant-branch-fold-1 ( -- ? ) constant-branch-fold-0 "hey" = ; inline
 [ 1 ] [ [ constant-branch-fold-1 [ 1 ] [ 2 ] if ] compile-call ] unit-test
 
 ! another regression
-: foo f ;
+: foo ( -- value ) f ;
 : bar ( -- ? ) foo 4 4 = and ;
 [ f ] [ bar ] unit-test
 
@@ -134,15 +134,15 @@ M: slice foozul ;
 ] unit-test
 
 ! regression
-: constant-fold-2 f ; foldable
-: constant-fold-3 4 ; foldable
+: constant-fold-2 ( -- value ) f ; foldable
+: constant-fold-3 ( -- value ) 4 ; foldable
 
 [ f t ] [
     [ constant-fold-2 constant-fold-3 4 = ] compile-call
 ] unit-test
 
-: constant-fold-4 f ; foldable
-: constant-fold-5 f ; foldable
+: constant-fold-4 ( -- value ) f ; foldable
+: constant-fold-5 ( -- value ) f ; foldable
 
 [ f ] [
     [ constant-fold-4 constant-fold-5 or ] compile-call
@@ -247,7 +247,7 @@ USE: binary-search.private
 [ 3 "an integer" ] [ 3 lift-throw-tail-regression ] unit-test
 [ "hi" "a string" ] [ "hi" lift-throw-tail-regression ] unit-test
 
-: lift-loop-tail-test-1 ( a quot -- )
+: lift-loop-tail-test-1 ( a quot: ( -- ) -- )
     over even? [
         [ [ 3 - ] dip call ] keep lift-loop-tail-test-1
     ] [
@@ -256,11 +256,13 @@ USE: binary-search.private
         ] [
             [ [ 2 - ] dip call ] keep lift-loop-tail-test-1
         ] if
-    ] if ; inline
+    ] if ; inline recursive
 
-: lift-loop-tail-test-2
+: lift-loop-tail-test-2 ( -- a b c )
     10 [ ] lift-loop-tail-test-1 1 2 3 ;
 
+\ lift-loop-tail-test-2 must-infer
+
 [ 1 2 3 ] [ lift-loop-tail-test-2 ] unit-test
 
 ! Forgot a recursive inline check
index 0fde270eac0e588fea76acefa35c3315965fbe8f..d53b864b06c7dc8e9ee5b275552160e756854d49 100644 (file)
@@ -18,13 +18,13 @@ IN: compiler.tests
 [ "hey" ] [ [ "hey" ] compile-call ] unit-test
 
 ! Calls
-: no-op ;
+: no-op ( -- ) ;
 
 [ ] [ [ no-op ] compile-call ] unit-test
 [ 3 ] [ [ no-op 3 ] compile-call ] unit-test
 [ 3 ] [ [ 3 no-op ] compile-call ] unit-test
 
-: bar 4 ;
+: bar ( -- value ) 4 ;
 
 [ 4 ] [ [ bar no-op ] compile-call ] unit-test
 [ 4 3 ] [ [ no-op bar 3 ] compile-call ] unit-test
index 751a335a1353d36e138419c1108378614f892500..54f8aaf20ecae62f4666254d311a73368d6d4da0 100755 (executable)
@@ -474,7 +474,7 @@ cell-bits 32 = [
 ] unit-test
 
 ! A reduction
-: buffalo-sauce f ;
+: buffalo-sauce ( -- value ) f ;
 
 : steak ( -- )
     buffalo-sauce [ steak ] when ; inline recursive
index b1f94060924f8c4e054143132d185f478c13dc3f..d548d58bc6f9e8d19615fccb9841bd7873fbe7d9 100644 (file)
@@ -87,7 +87,7 @@ compiler.tree.combinators ;
     ] contains-node?
 ] unit-test
 
-: blah f ;
+: blah ( -- value ) f ;
 
 DEFER: a
 
index 197ace74d8e8a7ceefdf073dc2b45ab626f3786a..5bf62ef1566e3731c7003ea1f7b4786b8867acca 100644 (file)
@@ -1,6 +1,6 @@
 IN: tools.profiler.tests
 USING: accessors tools.profiler tools.test kernel memory math
-threads alien tools.profiler.private sequences compiler.units
+threads alien tools.profiler.private sequences compiler
 words ;
 
 [ t ] [