]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix unit tests and load errors for slip removal
authorSlava Pestov <slava@shill.internal.stack-effects.com>
Sun, 10 May 2009 22:03:41 +0000 (17:03 -0500)
committerSlava Pestov <slava@shill.internal.stack-effects.com>
Sun, 10 May 2009 22:03:41 +0000 (17:03 -0500)
12 files changed:
basis/compiler/tests/curry.factor
basis/compiler/tree/escape-analysis/escape-analysis-tests.factor
basis/compiler/tree/tuple-unboxing/tuple-unboxing-tests.factor
basis/stack-checker/stack-checker-tests.factor
basis/windows/com/com.factor
basis/windows/com/wrapper/wrapper.factor
core/kernel/kernel-tests.factor
extra/crypto/timing/authors.txt [deleted file]
extra/crypto/timing/timing-tests.factor [deleted file]
extra/crypto/timing/timing.factor [deleted file]
extra/reports/noise/noise.factor
extra/spider/unique-deque/unique-deque.factor

index 32611ba87a1d36ba1386f76d2ee958552da592a0..b541e19f34bf6c904ad30db38bb56843b604677f 100644 (file)
@@ -33,7 +33,7 @@ IN: compiler.tests.curry
 ] unit-test
 
 : foobar ( quot: ( -- ) -- )
-    dup slip swap [ foobar ] [ drop ] if ; inline recursive
+    [ call ] keep swap [ foobar ] [ drop ] if ; inline recursive
 
 [ ] [ [ [ f ] foobar ] compile-call ] unit-test
 
index 5f89372ebe2d7bec6898d15156f6c6390b5a9caf..3d9d77ae56b235c94da3c8356e49691fc2987b98 100644 (file)
@@ -302,7 +302,7 @@ C: <ro-box> ro-box
 [ 0 ] [ [ 1 cons boa "x" get slot ] count-unboxed-allocations ] unit-test
 
 : impeach-node ( quot: ( node -- ) -- )
-    dup slip impeach-node ; inline recursive
+    [ call ] keep impeach-node ; inline recursive
 
 : bleach-node ( quot: ( node -- ) -- )
     [ bleach-node ] curry [ ] compose impeach-node ; inline recursive
index 70670648b1666816d80b597bde1f3de9473b5bb4..0d5f05fab0592823f6e2eafadadaa99a2e01b2b1 100644 (file)
@@ -39,7 +39,7 @@ TUPLE: empty-tuple ;
 
 ! A more complicated example
 : impeach-node ( quot: ( node -- ) -- )
-    dup slip impeach-node ; inline recursive
+    [ call ] keep impeach-node ; inline recursive
 
 : bleach-node ( quot: ( node -- ) -- )
     [ bleach-node ] curry [ ] compose impeach-node ; inline recursive
index 919cd098f6c286bafe168a4b6a707680b3596eff..201f3ce30b8003b5a15840be40351e54655ac50f 100644 (file)
@@ -180,7 +180,7 @@ DEFER: blah4
     over [
         2drop
     ] [
-        [ swap slip ] keep swap bad-combinator
+        [ dip ] keep swap bad-combinator
     ] if ; inline recursive
 
 [ [ [ 1 ] [ ] bad-combinator ] infer ] must-fail
index af828c9145c61f00dc6b72eba13d0148e3226d0c..d485692a910fbef397b53e4c872661973280066c 100644 (file)
@@ -40,6 +40,6 @@ COM-INTERFACE: IDropTarget IUnknown {00000122-0000-0000-C000-000000000046}
     IUnknown::Release drop ; inline\r
 \r
 : with-com-interface ( interface quot -- )\r
-    over [ slip ] [ com-release ] [ ] cleanup ; inline\r
+    over [ com-release ] curry [ ] cleanup ; inline\r
 \r
 DESTRUCTOR: com-release\r
index e78c987cd4ac6ee8de1136dc37bb2e2b884af740..9d52378da912855bfbb39619b611fe53d83d7deb 100755 (executable)
@@ -93,7 +93,7 @@ unless
 
 : compile-alien-callback ( word return parameters abi quot -- word )
     '[ _ _ _ _ alien-callback ]
-    [ [ (( -- alien )) define-declared ] pick slip ]
+    [ [ (( -- alien )) define-declared ] pick [ call ] dip ]
     with-compilation-unit ;
 
 : (callback-word) ( function-name interface-name counter -- word )
index 5a88db4f9e0595e26fce7c28bf40f0799bfa6539..c8e0fcd2a98c7e2355ca12a4ec4645ec092963a0 100644 (file)
@@ -61,20 +61,16 @@ IN: kernel.tests
 [ 2 ] [ f 2 xor ] unit-test
 [ f ] [ f f xor ] unit-test
 
-[ slip ] must-fail
+[ dip ] must-fail
 [ ] [ :c ] unit-test
 
-[ 1 slip ] must-fail
+[ 1 [ call ] dip ] must-fail
 [ ] [ :c ] unit-test
 
-[ 1 2 slip ] must-fail
+[ 1 2 [ call ] dip ] must-fail
 [ ] [ :c ] unit-test
 
-[ 1 2 3 slip ] must-fail
-[ ] [ :c ] unit-test
-
-
-[ 5 ] [ [ 2 2 + ] 1 slip + ] unit-test
+[ 5 ] [ 1 [ 2 2 + ] dip + ] unit-test
 
 [ [ ] keep ] must-fail
 
diff --git a/extra/crypto/timing/authors.txt b/extra/crypto/timing/authors.txt
deleted file mode 100755 (executable)
index 7c1b2f2..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Doug Coleman
diff --git a/extra/crypto/timing/timing-tests.factor b/extra/crypto/timing/timing-tests.factor
deleted file mode 100644 (file)
index 9afb913..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-USING: crypto.timing kernel tools.test system math ;
-IN: crypto.timing.tests
-
-[ t ] [ millis [ ] 1000 with-timing millis swap - 1000 >= ] unit-test
diff --git a/extra/crypto/timing/timing.factor b/extra/crypto/timing/timing.factor
deleted file mode 100644 (file)
index b2a59a1..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-! Copyright (C) 2008 Doug Coleman.
-! See http://factorcode.org/license.txt for BSD license.
-USING: kernel math threads system calendar ;
-IN: crypto.timing
-
-: with-timing ( quot n -- )
-    #! force the quotation to execute in, at minimum, n milliseconds
-    millis 2slip millis - + milliseconds sleep ; inline
index 51196279ff0b728e2245d03c0a627218154b08bc..f5c2ea9811b0b25eb4d00fba5e83e48bed9e14b0 100755 (executable)
@@ -19,13 +19,11 @@ IN: reports.noise
         { 2keep 1 }\r
         { 2nip 2 }\r
         { 2over 4 }\r
-        { 2slip 2 }\r
         { 2swap 3 }\r
         { 3curry 2 }\r
         { 3drop 1 }\r
         { 3dup 2 }\r
         { 3keep 3 }\r
-        { 3slip 3 }\r
         { 4drop 2 }\r
         { 4dup 3 }\r
         { compose 1/2 }\r
@@ -58,7 +56,6 @@ IN: reports.noise
         { pick 4 }\r
         { roll 4 }\r
         { rot 3 }\r
-        { slip 1 }\r
         { spin 3 }\r
         { swap 1 }\r
         { swapd 3 }\r
index b26797f8d51dabb58f20d401edf39b1d5b327439..b4bbc9fbf8a5f5566f30189420940803bd0220ba 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2009 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors assocs deques dlists kernel spider ;
+USING: accessors assocs deques dlists kernel ;
 IN: spider.unique-deque
 
 TUPLE: todo-url url depth ;
@@ -32,6 +32,6 @@ TUPLE: unique-deque assoc deque ;
 
 : slurp-deque-when ( deque quot1 quot2: ( value -- ) -- )
     pick deque-empty? [ 3drop ] [
-        [ [ pop-front dup ] 2dip slip [ t ] compose [ drop f ] if ]
+        [ [ pop-front dup ] 2dip [ call ] dip [ t ] compose [ drop f ] if ]
         [ roll [ slurp-deque-when ] [ 3drop ] if ] 3bi
     ] if ; inline recursive