]> gitweb.factorcode.org Git - factor.git/commitdiff
Remove >r/r>
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 01:17:37 +0000 (19:17 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 18 Dec 2008 01:17:37 +0000 (19:17 -0600)
46 files changed:
basis/compiler/cfg/builder/builder-tests.factor
basis/compiler/cfg/linear-scan/linear-scan-tests.factor
basis/compiler/tests/codegen.factor
basis/compiler/tests/curry.factor
basis/compiler/tests/optimizer.factor
basis/compiler/tree/dead-code/dead-code-tests.factor
basis/compiler/tree/debugger/debugger.factor
basis/compiler/tree/modular-arithmetic/modular-arithmetic-tests.factor
basis/compiler/tree/propagation/propagation-tests.factor
basis/cpu/ppc/bootstrap.factor
basis/cpu/x86/64/64.factor
basis/cpu/x86/bootstrap.factor
basis/db/sqlite/lib/lib.factor
basis/delegate/delegate-tests.factor
basis/fry/fry-docs.factor
basis/fry/fry-tests.factor
basis/fry/fry.factor
basis/furnace/chloe-tags/chloe-tags.factor
basis/grouping/grouping-docs.factor
basis/heaps/heaps-tests.factor
basis/lcs/lcs.factor
basis/locals/rewrite/point-free/point-free.factor
basis/locals/rewrite/sugar/sugar.factor
basis/match/match.factor
basis/math/functions/functions-tests.factor
basis/math/intervals/intervals-tests.factor
basis/opengl/shaders/shaders.factor
basis/persistent/deques/deques.factor
basis/persistent/heaps/heaps.factor
basis/serialize/serialize.factor
basis/stack-checker/errors/errors-docs.factor
basis/stack-checker/known-words/known-words.factor
basis/stack-checker/stack-checker-tests.factor
basis/tuple-arrays/tuple-arrays.factor
basis/validators/validators.factor
basis/windows/dragdrop-listener/dragdrop-listener.factor
basis/windows/kernel32/kernel32.factor
basis/xml-rpc/example.factor
basis/xml-rpc/xml-rpc.factor
basis/xmode/catalog/catalog.factor
basis/xmode/loader/syntax/syntax.factor
basis/xmode/marker/marker.factor
basis/xmode/marker/state/state.factor
basis/xmode/rules/rules.factor
basis/xmode/utilities/utilities.factor
core/bootstrap/primitives.factor

index c3cce1425e9705c11f02e585629b48bb24f26a1e..0b303a8a43440429ba748dcbc7765ec96aed3fa5 100644 (file)
@@ -14,7 +14,7 @@ kernel.private math ;
     [ ]
     [ dup ]
     [ swap ]
-    [ >r r> ]
+    [ [ ] dip ]
     [ fixnum+ ]
     [ fixnum+fast ]
     [ 3 fixnum+fast ]
index 948302c74b58093678213d610c3dfd010a92741e..7420b4fd175f7ad1c495d8a689aab1b3f6234e01 100644 (file)
@@ -249,7 +249,7 @@ SYMBOL: max-uses
     ] with-scope ;
 
 : random-test ( num-intervals max-uses max-registers max-insns -- )
-    over >r random-live-intervals r> int-regs associate check-linear-scan ;
+    over [ random-live-intervals ] dip int-regs associate check-linear-scan ;
 
 [ ] [ 30 2 1 60 random-test ] unit-test
 [ ] [ 60 2 2 60 random-test ] unit-test
index e743c8484bc3c2cc1e9786e5822380ab27bc822e..3d17009e311c695b199de9451ded4a0ded547adc 100644 (file)
@@ -75,7 +75,7 @@ unit-test
     -12 -13 [ [ 0 swap fixnum-fast ] bi@ ] compile-call
 ] unit-test
 
-[ -1 2 ] [ 1 2 [ >r 0 swap fixnum- r> ] compile-call ] unit-test
+[ -1 2 ] [ 1 2 [ [ 0 swap fixnum- ] dip ] compile-call ] unit-test
 
 [ 12 13 ] [
     -12 -13 [ [ 0 swap fixnum- ] bi@ ] compile-call
@@ -88,13 +88,13 @@ unit-test
 ! Test slow shuffles
 [ 3 1 2 3 4 5 6 7 8 9 ] [
     1 2 3 4 5 6 7 8 9
-    [ >r >r >r >r >r >r >r >r >r 3 r> r> r> r> r> r> r> r> r> ]
+    [ [ [ [ [ [ [ [ [ [ 3 ] dip ] dip ] dip ] dip ] dip ] dip ] dip ] dip ] dip ]
     compile-call
 ] unit-test
 
 [ 2 2 2 2 2 2 2 2 2 2 1 ] [
     1 2
-    [ swap >r dup dup dup dup dup dup dup dup dup r> ] compile-call
+    [ swap [ dup dup dup dup dup dup dup dup dup ] dip ] compile-call
 ] unit-test
 
 [ ] [ [ 9 [ ] times ] compile-call ] unit-test
@@ -110,7 +110,7 @@ unit-test
     float+ swap { [ "hey" ] [ "bye" ] } dispatch ;
 
 : try-breaking-dispatch-2 ( -- ? )
-    1 1.0 2.5 try-breaking-dispatch "bye" = >r 3.5 = r> and ;
+    1 1.0 2.5 try-breaking-dispatch "bye" = [ 3.5 = ] dip and ;
 
 [ t ] [
     10000000 [ drop try-breaking-dispatch-2 ] all?
@@ -131,10 +131,10 @@ unit-test
     2dup 1 slot eq? [ 2drop ] [ 
         2dup array-nth tombstone? [ 
             [
-                [ array-nth ] 2keep >r 1 fixnum+fast r> array-nth
+                [ array-nth ] 2keep [ 1 fixnum+fast ] dip array-nth
                 pick 2dup hellish-bug-1 3drop
             ] 2keep
-        ] unless >r 2 fixnum+fast r> hellish-bug-2
+        ] unless [ 2 fixnum+fast ] dip hellish-bug-2
     ] if ; inline recursive
 
 : hellish-bug-3 ( hash array -- ) 
@@ -159,9 +159,9 @@ TUPLE: my-tuple ;
 [ 5 ] [ "hi" foox ] unit-test
 
 ! Making sure we don't needlessly unbox/rebox
-[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ >r eq? r> ] compile-call ] unit-test
+[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ [ eq? ] dip ] compile-call ] unit-test
 
-[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ ] compile-call >r eq? r> ] unit-test
+[ t 3.0 ] [ 1.0 dup [ dup 2.0 float+ ] compile-call [ eq? ] dip ] unit-test
 
 [ t ] [ 1.0 dup [ [ 2.0 float+ ] keep ] compile-call nip eq? ] unit-test
 
@@ -188,7 +188,7 @@ TUPLE: my-tuple ;
 
 [ 2 1 ] [
     2 1
-    [ 2dup fixnum< [ >r die r> ] when ] compile-call
+    [ 2dup fixnum< [ [ die ] dip ] when ] compile-call
 ] unit-test
 
 ! Regression
index ecc2d87b7330f1910c431477f509a1a47d04f4f1..1857baf503560e798d37e17a37d515fa6131bded 100644 (file)
@@ -8,7 +8,7 @@ IN: compiler.tests
 [ 3 ] [ 5 [ 2 [ - ] 2curry call ] compile-call ] unit-test
 [ 3 ] [ 5 2 [ [ - ] 2curry call ] compile-call ] unit-test
 [ 3 ] [ 5 2 [ [ - ] 2curry 9 swap call /i ] compile-call ] unit-test
-[ 3 ] [ 5 2 [ [ - ] 2curry >r 9 r> call /i ] compile-call ] unit-test
+[ 3 ] [ 5 2 [ [ - ] 2curry [ 9 ] dip call /i ] compile-call ] unit-test
 
 [ -10 -20 ] [ 10 20 -1 [ [ * ] curry bi@ ] compile-call ] unit-test
 
@@ -21,14 +21,14 @@ IN: compiler.tests
 [ [ 6 2 + ] ]
 [
     2 5
-    [ >r [ + ] curry r> 0 < [ -2 ] [ 6 ] if swap curry ]
+    [ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry ]
     compile-call >quotation
 ] unit-test
 
 [ 8 ]
 [
     2 5
-    [ >r [ + ] curry r> 0 < [ -2 ] [ 6 ] if swap curry call ]
+    [ [ [ + ] curry ] dip 0 < [ -2 ] [ 6 ] if swap curry call ]
     compile-call
 ] unit-test
 
index fa6a3c7b21647ff3282cdc2f974268f7df8cf80b..bb1cb2eab5079f8a89d56076a137f2e8de09080f 100644 (file)
@@ -248,12 +248,12 @@ USE: binary-search.private
 
 : lift-loop-tail-test-1 ( a quot -- )
     over even? [
-        [ >r 3 - r> call ] keep lift-loop-tail-test-1
+        [ [ 3 - ] dip call ] keep lift-loop-tail-test-1
     ] [
         over 0 < [
             2drop
         ] [
-            [ >r 2 - r> call ] keep lift-loop-tail-test-1
+            [ [ 2 - ] dip call ] keep lift-loop-tail-test-1
         ] if
     ] if ; inline
 
@@ -290,7 +290,7 @@ HINTS: recursive-inline-hang-3 array ;
 
 ! Wow
 : counter-example ( a b c d -- a' b' c' d' )
-    dup 0 > [ 1 - >r rot 2 * r> counter-example ] when ; inline
+    dup 0 > [ 1 - [ rot 2 * ] dip counter-example ] when ; inline
 
 : counter-example' ( -- a' b' c' d' )
     1 2 3.0 3 counter-example ;
@@ -330,7 +330,7 @@ PREDICATE: list < improper-list
 [ 0 5 ] [ 0 interval-inference-bug ] unit-test
 
 : aggressive-flush-regression ( a -- b )
-    f over >r <array> drop r> 1 + ;
+    f over [ <array> drop ] dip 1 + ;
 
 [ 1.0 aggressive-flush-regression drop ] must-fail
 
index b64e30d8f94394a9ac5914fe95035504a3ea4a94..1e9e93fa7c67afa0762554ba9733d26b67a8e5f9 100644 (file)
@@ -79,7 +79,7 @@ IN: compiler.tree.dead-code.tests
 
 [ [ read drop 1 2 ] ] [ [ read [ 1 2 ] dip drop ] optimize-quot ] unit-test
 
-[ [ over >r + r> ] ] [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test
+[ [ over [ + ] dip ] ] [ [ [ + ] [ drop ] 2bi ] optimize-quot ] unit-test
 
 [ [ [ ] [ ] if ] ] [ [ [ 1 ] [ 2 ] if drop ] optimize-quot ] unit-test
 
index 213a8357e646266035c811f9881d47699e06884c..9f2cc0536e34a9bc622317e9b67d8410484aa61a 100644 (file)
@@ -80,10 +80,12 @@ M: shuffle-node pprint* effect>> effect>string text ;
         [ out-d>> length 1 = ]
     } 1&& ;
 
+SYMBOLS: >R R> ;
+
 M: #shuffle node>quot
     {
-        { [ dup #>r? ] [ drop \ >r , ] }
-        { [ dup #r>? ] [ drop \ r> , ] }
+        { [ dup #>r? ] [ drop \ >R , ] }
+        { [ dup #r>? ] [ drop \ R> , ] }
         {
             [ dup [ in-r>> empty? ] [ out-r>> empty? ] bi and ]
             [
index b535dfe39c2047a420254db4aa3405c9298b497b..31c50587cf307cdbb1816178faba5346104e4a7b 100644 (file)
@@ -8,13 +8,13 @@ compiler.tree.debugger ;
 : test-modular-arithmetic ( quot -- quot' )
     build-tree optimize-tree nodes>quot ;
 
-[ [ >r >fixnum r> >fixnum fixnum+fast ] ]
+[ [ [ >fixnum ] dip >fixnum fixnum+fast ] ]
 [ [ { integer integer } declare + >fixnum ] test-modular-arithmetic ] unit-test
 
 [ [ +-integer-integer dup >fixnum ] ]
 [ [ { integer integer } declare + dup >fixnum ] test-modular-arithmetic ] unit-test
 
-[ [ >r >fixnum r> >fixnum fixnum+fast 4 fixnum*fast ] ]
+[ [ [ >fixnum ] dip >fixnum fixnum+fast 4 fixnum*fast ] ]
 [ [ { integer integer } declare + 4 * >fixnum ] test-modular-arithmetic ] unit-test
 
 TUPLE: declared-fixnum { x fixnum } ;
index 87152a8e2bcbe7dda771537670ff23ef61fab6c2..b9a88de34aaed1110ec814beecc46ee3812cde12 100644 (file)
@@ -18,7 +18,7 @@ IN: compiler.tree.propagation.tests
 
 [ V{ fixnum } ] [ [ 1 ] final-classes ] unit-test
 
-[ V{ fixnum } ] [ [ 1 >r r> ] final-classes ] unit-test
+[ V{ fixnum } ] [ [ 1 [ ] dip ] final-classes ] unit-test
 
 [ V{ fixnum object } ] [ [ 1 swap ] final-classes ] unit-test
 
@@ -198,7 +198,7 @@ IN: compiler.tree.propagation.tests
     [
         { fixnum byte-array } declare
         [ nth-unsafe ] 2keep [ nth-unsafe ] 2keep nth-unsafe
-        >r >r 298 * r> 100 * - r> 208 * - 128 + -8 shift
+        [ [ 298 * ] dip 100 * - ] dip 208 * - 128 + -8 shift
         255 min 0 max
     ] final-classes
 ] unit-test
index 445c7082bcbce551b35a676a5fcbbf194f5d65b8..b27f3aee72b0f7940405ce65572943d501af3ce4 100644 (file)
@@ -302,9 +302,7 @@ big-endian on
     4 ds-reg 0 STW\r
 ] f f f \ -rot define-sub-primitive\r
 \r
-[ jit->r ] f f f \ >r define-sub-primitive\r
-\r
-[ jit-r> ] f f f \ r> define-sub-primitive\r
+[ jit->r ] f f f \ load-local define-sub-primitive\r
 \r
 ! Comparisons\r
 : jit-compare ( insn -- )\r
index 841a4e4c5518264cd8dec2332ade0f5f1d1dea5b..e46c8f691457c20d125760f2ff9819cf227d9ab6 100644 (file)
@@ -50,8 +50,8 @@ M: x86.64 %prologue ( n -- )
 
 M: stack-params %load-param-reg
     drop
-    >r R11 swap param@ MOV
-    r> param@ R11 MOV ;
+    [ R11 swap param@ MOV ] dip
+    param@ R11 MOV ;
 
 M: stack-params %save-param-reg
     drop
index 26488b8d959659762ce7609a68e2a80962aa3772..5e3405e93ad80fe5544787b57021762fcd0f5dc7 100644 (file)
@@ -319,9 +319,7 @@ big-endian off
     ds-reg [] temp1 MOV
 ] f f f \ -rot define-sub-primitive
 
-[ jit->r ] f f f \ >r define-sub-primitive
-
-[ jit-r> ] f f f \ r> define-sub-primitive
+[ jit->r ] f f f \ load-local define-sub-primitive
 
 ! Comparisons
 : jit-compare ( insn -- )
index bcd38b172dc4b77cc8c2dad5755efa13f3b8a065..fd0d1131d7473586668bff421f23647bedd018a8 100644 (file)
@@ -42,7 +42,7 @@ ERROR: sqlite-sql-error < sql-error n string ;
     sqlite3_bind_parameter_index ;
 
 : parameter-index ( handle name text -- handle name text )
-    >r dupd sqlite-bind-parameter-index r> ;
+    [ dupd sqlite-bind-parameter-index ] dip ;
 
 : sqlite-bind-text ( handle index text -- )
     utf8 encode dup length SQLITE_TRANSIENT
index d1e7d31656e7847d710ee1820aa7f4dd821e2995..7d297af1ed1dd75b7e0d8ae39dd23726869b445f 100644 (file)
@@ -20,7 +20,7 @@ PROTOCOL: baz foo { bar 0 } { whoa 1 } ;
 CONSULT: baz goodbye these>> ;
 M: hello foo this>> ;
 M: hello bar hello-test ;
-M: hello whoa >r this>> r> + ;
+M: hello whoa [ this>> ] dip + ;
 
 GENERIC: bing ( c -- d )
 PROTOCOL: bee bing ;
index 1dff0942bd301327bbb077ef6cf1d90bf5e37401..d91f44aecb603cd0a59ff829bbcb5ca34cc7afc3 100644 (file)
@@ -20,7 +20,7 @@ HELP: '[
 { $examples "See " { $link "fry.examples" } "." } ;\r
 \r
 HELP: >r/r>-in-fry-error\r
-{ $error-description "Thrown by " { $link POSTPONE: '[ } " if the fried quotation contains calls to " { $link >r } " or " { $link r> } ". Explicit retain stack manipulation of this form does not work with fry; use " { $link dip } " instead." } ;\r
+{ $error-description "Thrown by " { $link POSTPONE: '[ } " if the fried quotation contains calls to retain stack manipulation primitives." } ;\r
 \r
 ARTICLE: "fry.examples" "Examples of fried quotations"\r
 "The easiest way to understand fried quotations is to look at some examples."\r
index 0137e8be22b7d159aef81da677225a751f30cac4..ca0268ee70f7bfe87e04d4e22d2e7b1a4a81440f 100644 (file)
@@ -56,7 +56,7 @@ sequences eval accessors ;
     3 '[ [ [ _ 1array ] call 1array ] call 1array ] call
 ] unit-test
 
-[ "USING: fry kernel ; f '[ >r _ r> ]" eval ]
+[ "USING: fry kernel ; f '[ load-local _ ]" eval ]
 [ error>> >r/r>-in-fry-error? ] must-fail-with
 
 [ { { "a" 1 } { "b" 2 } { "c" 3 } { "d" 4 } } ] [
index f84ad233cd8b5c1b9420e3efb0eb950b3d209fe8..e62a42749fef2a8313d58a91a2131381c9887274 100644 (file)
@@ -25,7 +25,7 @@ M: >r/r>-in-fry-error summary
     "Explicit retain stack manipulation is not permitted in fried quotations" ;
 
 : check-fry ( quot -- quot )
-    dup { >r r> load-locals get-local drop-locals } intersect
+    dup { load-local load-locals get-local drop-locals } intersect
     empty? [ >r/r>-in-fry-error ] unless ;
 
 PREDICATE: fry-specifier < word { _ @ } memq? ;
index f500acd7ab60ee5ef07cbfec9ed1c40851b9b7bf..1c320182bf39c30b2fe6ac2f4dafa3e88b87fdb3 100644 (file)
@@ -32,7 +32,7 @@ IN: furnace.chloe-tags
     [ [ "/" ?tail drop "/" ] dip present 3append ] when* ;
 
 : a-url ( href rest query value-name -- url )
-    dup [ >r 3drop r> value ] [
+    dup [ [ 3drop ] dip value ] [
         drop
         <url>
             swap parse-query-attr >>query
index 3b3a98eabd17b470045a12b5477fd3c2d055de92..e68c0ede1ac4d86e9d6df4e2db1f7ece26d9b465 100644 (file)
@@ -20,7 +20,7 @@ ARTICLE: "grouping" "Groups and clumps"
         { $unchecked-example "dup n groups concat sequence= ." "t" }
     }
     { "With clumps, collecting the first element of each subsequence but the last one, together with the last subseqence, yields the original sequence:"
-        { $unchecked-example "dup n clumps unclip-last >r [ first ] map r> append sequence= ." "t" }
+        { $unchecked-example "dup n clumps unclip-last [ [ first ] map ] dip append sequence= ." "t" }
     }
 } ;
 
index e28eb3007a4e148bebb82a5a9f3f8297cdf351c1..8fa6a274e7e65aa4cae36b22eb1d111fbea3bda3 100644 (file)
@@ -61,7 +61,7 @@ IN: heaps.tests
         random-alist
         <min-heap> [ heap-push-all ] keep
         dup data>> clone swap
-    ] keep 3 /i [ 2dup >r delete-random r> heap-delete ] times
+    ] keep 3 /i [ 2dup [ delete-random ] dip heap-delete ] times
     data>>
     [ [ key>> ] map ] bi@
     [ natural-sort ] bi@ ;
index 759e923a34b8eae56f203e9e68705864198dbff5..8c67590697a603698d9a9ac48736efce9204ca57 100644 (file)
@@ -5,7 +5,7 @@ IN: lcs
 \r
 <PRIVATE\r
 : levenshtein-step ( insert delete change same? -- next )\r
-    0 1 ? + >r [ 1+ ] bi@ r> min min ;\r
+    0 1 ? + [ [ 1+ ] bi@ ] dip min min ;\r
 \r
 : lcs-step ( insert delete change same? -- next )\r
     1 -1./0. ? + max max ; ! -1./0. is -inf (float)\r
index bd322bfff32f102ececdca7b2bb0dafe5c1921d6..33e0f4d3b330d2b7ed8bf45952c2b2ec52402ef7 100644 (file)
@@ -30,7 +30,10 @@ M: local-writer localize
     read-local-quot [ set-local-value ] append ;
 
 M: def localize
-    local>> [ prefix ] [ local-reader? [ 1array >r ] [ >r ] ? ] bi ;
+    local>>
+    [ prefix ]
+    [ local-reader? [ 1array load-local ] [ load-local ] ? ]
+    bi ;
 
 M: object localize 1quotation ;
 
index 05b1e2345e687160e5a5a37a68cae8098e4d7369..835fa6e421818b5dc36c58cbef94d758b6166be1 100644 (file)
@@ -101,7 +101,7 @@ M: hashtable rewrite-sugar* rewrite-element ;
 M: wrapper rewrite-sugar* rewrite-element ;
 
 M: word rewrite-sugar*
-    dup { >r r> load-locals get-local drop-locals } memq?
+    dup { load-locals get-local drop-locals } memq?
     [ >r/r>-in-lambda-error ] [ call-next-method ] if ;
 
 M: object rewrite-sugar* , ;
index 7d393dadc9a2bab92567ec252275d2009915e97c..fee06686b8ffe68f39d60b6a71e425716ccedfd9 100644 (file)
@@ -47,7 +47,7 @@ MACRO: match-cond ( assoc -- )
     [ "Fall-through in match-cond" throw ]
     [
         first2
-        >r [ dupd match ] curry r>
+        [ [ dupd match ] curry ] dip
         [ bind ] curry rot
         [ ?if ] 2curry append
     ] reduce ;
index a06a67e4a11facbd5026aacf71f27594d70a587e..cf0ce5f0bb5642b7f72e84fa6022a50eca9f9473 100644 (file)
@@ -97,7 +97,7 @@ IN: math.functions.tests
 
 : verify-gcd ( a b -- ? )
     2dup gcd
-    >r rot * swap rem r> = ; 
+    [ rot * swap rem ] dip = ; 
 
 [ t ] [ 123 124 verify-gcd ] unit-test
 [ t ] [ 50 120 verify-gcd ] unit-test
index 8c29171a57dd31a153383d4cd16668a70498abfd..378ca2fb4b0cbb99774c8f35b93d03a68270e58a 100644 (file)
@@ -255,8 +255,7 @@ IN: math.intervals.tests
     0 pick interval-contains? over first \ recip eq? and [
         2drop t
     ] [
-        [ >r random-element ! dup .
-        r> first execute ] 2keep
+        [ [ random-element ] dip first execute ] 2keep
         second execute interval-contains?
     ] if ;
 
@@ -287,8 +286,7 @@ IN: math.intervals.tests
     0 pick interval-contains? over first { / /i mod rem } member? and [
         3drop t
     ] [
-        [ >r [ random-element ] bi@ ! 2dup . .
-        r> first execute ] 3keep
+        [ [ [ random-element ] bi@ ] dip first execute ] 3keep
         second execute interval-contains?
     ] if ;
 
@@ -304,7 +302,7 @@ IN: math.intervals.tests
 
 : comparison-test ( -- ? )
     random-interval random-interval random-comparison
-    [ >r [ random-element ] bi@ r> first execute ] 3keep
+    [ [ [ random-element ] bi@ ] dip first execute ] 3keep
     second execute dup incomparable eq? [ 2drop t ] [ = ] if ;
 
 [ t ] [ 40000 [ drop comparison-test ] all? ] unit-test
index 5b63b63afea35e45f4b67207ad4a291b94a57a86..eb5bbb0ee857ca983b7a92298ca602de0d3128a0 100755 (executable)
@@ -115,7 +115,7 @@ PREDICATE: fragment-shader < gl-shader (fragment-shader?) ;
 PREDICATE: gl-program < integer (gl-program?) ;
 
 : <simple-gl-program> ( vertex-shader-source fragment-shader-source -- program )
-    >r <vertex-shader> check-gl-shader
-    r> <fragment-shader> check-gl-shader
+    [ <vertex-shader> check-gl-shader ]
+    [ <fragment-shader> check-gl-shader ] bi*
     2array <gl-program> check-gl-program ;
 
index 657f7ce56ad42f128addd1c34df39aa5aa751c00..be63d807b9796aca54e38fdb224b88795c63b095 100644 (file)
@@ -14,7 +14,7 @@ C: <cons> cons
 
 : each ( list quot: ( elt -- ) -- )
     over
-    [ [ >r car>> r> call ] [ >r cdr>> r> ] 2bi each ]
+    [ [ [ car>> ] dip call ] [ [ cdr>> ] dip ] 2bi each ]
     [ 2drop ] if ; inline recursive
 
 : reduce ( list start quot -- end )
@@ -27,7 +27,7 @@ C: <cons> cons
     0 [ drop 1+ ] reduce ;
 
 : cut ( list index -- back front-reversed )
-    f swap [ >r [ cdr>> ] [ car>> ] bi r> <cons> ] times ;
+    f swap [ [ [ cdr>> ] [ car>> ] bi ] dip <cons> ] times ;
 
 : split-reverse ( list -- back-reversed front )
     dup length 2/ cut [ reverse ] bi@ ;
@@ -41,7 +41,7 @@ TUPLE: deque { front read-only } { back read-only } ;
     [ back>> ] [ front>> ] bi deque boa ;
 
 : flipped ( deque quot -- newdeque )
-    >r flip r> call flip ;
+    [ flip ] dip call flip ;
 PRIVATE>
 
 : deque-empty? ( deque -- ? )
index 6381b91dc31c3aa37dd4753d21effe71f6b43d74..f6d38b5b2504a578e31c46b127a953fc25bdf87c 100644 (file)
@@ -32,7 +32,7 @@ PRIVATE>
     [ >branch< swap remove-left -rot [ <branch> ] 2dip rot ] if ;
 
 : both-with? ( obj a b quot -- ? )
-   swap >r with r> swap both? ; inline
+   swap [ with ] dip swap both? ; inline
 
 GENERIC: sift-down ( value prio left right -- heap )
 
index f062548482edb8f5d5572a1936e6de05cd6e4b78..3ec1e96c7264d6cce43df3f934cc3397d9602479 100644 (file)
@@ -70,9 +70,10 @@ M: id equal? over id? [ [ obj>> ] bi@ eq? ] [ 2drop f ] if ;
     } cond ;
 
 : serialize-shared ( obj quot -- )
-    >r dup object-id
-    [ CHAR: o write1 serialize-cell drop ]
-    r> if* ; inline
+    [
+        dup object-id
+        [ CHAR: o write1 serialize-cell drop ]
+    ] dip if* ; inline
 
 M: f (serialize) ( obj -- )
     drop CHAR: n write1 ;
@@ -256,7 +257,7 @@ SYMBOL: deserialized
     [ ] tri ;
 
 : copy-seq-to-tuple ( seq tuple -- )
-    >r dup length r> [ set-array-nth ] curry 2each ;
+    [ dup length ] dip [ set-array-nth ] curry 2each ;
 
 : deserialize-tuple ( -- array )
     #! Ugly because we have to intern the tuple before reading
index d4a074031dc319a92f996dd2c0e83977d2c87f36..c3b9797a363a42095dd052aeddb3b03ea121a434 100644 (file)
@@ -28,22 +28,10 @@ $nl
 } ;
 
 HELP: too-many->r
-{ $error-description "Thrown if inference notices a quotation pushing elements on the retain stack without popping them at the end." }
-{ $examples
-    { $code
-        ": too-many->r-example ( a b -- )"
-        "    >r 3 + >r ;"
-    }
-} ;
+{ $error-description "Thrown if inference notices a quotation pushing elements on the retain stack without popping them at the end." } ;
 
 HELP: too-many-r>
-{ $error-description "Thrown if inference notices a quotation popping elements from the return stack it did not place there." }
-{ $examples
-    { $code
-        ": too-many-r>-example ( a b -- )"
-        "    r> 3 + >r ;"
-    }
-} ;
+{ $error-description "Thrown if inference notices a quotation popping elements from the return stack it did not place there." } ;
 
 HELP: missing-effect
 { $error-description "Thrown when inference encounters a word lacking a stack effect declaration. Stack effects of words must be declared, with the exception of words which only push literals on the stack." }
index bce42f1456e325546fb781dec7333198dda1749e..62d2b5036c9a1b2f6414fb5cede8be17e0582d81 100644 (file)
@@ -174,8 +174,6 @@ M: object infer-call*
 
 : infer-special ( word -- )
     {
-        { \ >r [ 1 infer->r ] }
-        { \ r> [ 1 infer-r> ] }
         { \ declare [ infer-declare ] }
         { \ call [ infer-call ] }
         { \ (call) [ infer-call ] }
@@ -213,7 +211,7 @@ M: object infer-call*
     "local-word-def" word-prop infer-quot-here ;
 
 {
-    >r r> declare call (call) slip 2slip 3slip dip 2dip 3dip
+    declare call (call) slip 2slip 3slip dip 2dip 3dip
     curry compose execute (execute) if dispatch <tuple-boa>
     (throw) load-locals get-local drop-locals do-primitive
     alien-invoke alien-indirect alien-callback
index defcde53f034b0e32944f4151f85a17c4228d8c9..8dd07b9619b65dd014c484d7e46cd9e16950e014 100644 (file)
@@ -218,7 +218,7 @@ DEFER: do-crap*
 MATH: xyz ( a b -- c )
 M: fixnum xyz 2array ;
 M: float xyz
-    [ 3 ] bi@ swapd >r 2array swap r> 2array swap ;
+    [ 3 ] bi@ swapd [ 2array swap ] dip 2array swap ;
 
 [ [ xyz ] infer ] [ inference-error? ] must-fail-with
 
@@ -480,7 +480,7 @@ DEFER: an-inline-word
     dup [ normal-word-2 ] when ;
 
 : an-inline-word ( obj quot -- )
-    >r normal-word r> call ; inline
+    [ normal-word ] dip call ; inline
 
 { 1 1 } [ [ 3 * ] an-inline-word ] must-infer-as
 
@@ -503,7 +503,7 @@ ERROR: custom-error ;
 ] unit-test
 
 [ T{ effect f 1 1 t } ] [
-    [ dup >r 3 throw r> ] infer
+    [ dup [ 3 throw ] dip ] infer
 ] unit-test
 
 ! This was a false trigger of the undecidable quotation
@@ -511,7 +511,7 @@ ERROR: custom-error ;
 { 2 1 } [ find-last-sep ] must-infer-as
 
 ! Regression
-: missing->r-check >r ;
+: missing->r-check 1 load-locals ;
 
 [ [ missing->r-check ] infer ] must-fail
 
@@ -548,7 +548,7 @@ M: object inference-invalidation-d inference-invalidation-c 2drop ;
 
 [ [ inference-invalidation-d ] infer ] must-fail
 
-: bad-recursion-3 ( -- ) dup [ >r bad-recursion-3 r> ] when ; inline
+: bad-recursion-3 ( -- ) dup [ [ bad-recursion-3 ] dip ] when ; inline
 [ [ bad-recursion-3 ] infer ] must-fail
 
 : bad-recursion-4 ( -- ) 4 [ dup call roll ] times ; inline
@@ -572,7 +572,7 @@ M: object inference-invalidation-d inference-invalidation-c 2drop ;
 
 DEFER: eee'
 : ddd' ( ? -- ) [ f eee' ] when ; inline recursive
-: eee' ( ? -- ) >r swap [ ] r> ddd' call ; inline recursive
+: eee' ( ? -- ) [ swap [ ] ] dip ddd' call ; inline recursive
 
 [ [ eee' ] infer ] [ inference-error? ] must-fail-with
 
index 5da70857734d950ca100df6377ac5bb2b37b0914..af62c0b0d714389320e798cba4f7c269380863d4 100644 (file)
@@ -16,7 +16,7 @@ M: tuple-array nth
     [ seq>> nth ] [ class>> ] bi prefix >tuple ;
 
 M: tuple-array set-nth ( elt n seq -- )
-    >r >r tuple>array 1 tail r> r> seq>> set-nth ;
+    [ tuple>array 1 tail ] 2dip seq>> set-nth ;
 
 M: tuple-array new-sequence
     class>> <tuple-array> ;
index 7c41d3efdb7ec4f885aff4ccbd588702d495f1df..78e01fdaf7854a89cb608239068ffa115c693828 100644 (file)
@@ -51,7 +51,7 @@ IN: validators
     ] if ;
 
 : v-regexp ( str what regexp -- str )
-    >r over r> matches?
+    [ over ] dip matches?
     [ drop ] [ "invalid " prepend throw ] if ;
 
 : v-email ( str -- str )
index 8384bb1acc18b4f4550f834b3be1ade6655bcbd6..4543aa703a0188db1a0bde7bdfb4ca19ffcb9656 100644 (file)
@@ -36,26 +36,30 @@ SYMBOL: +listener-dragdrop-wrapper+
 {\r
     { "IDropTarget" {\r
         [ ! DragEnter\r
-            >r 2drop\r
-            filenames-from-data-object\r
-            length 1 = [ DROPEFFECT_COPY ] [ DROPEFFECT_NONE ] if\r
-            dup 0 r> set-ulong-nth\r
+            [\r
+                2drop\r
+                filenames-from-data-object\r
+                length 1 = [ DROPEFFECT_COPY ] [ DROPEFFECT_NONE ] if\r
+                dup 0\r
+            ] dip set-ulong-nth\r
             >>last-drop-effect drop\r
             S_OK\r
         ] [ ! DragOver\r
-            >r 2drop last-drop-effect>> 0 r> set-ulong-nth\r
+            [ 2drop last-drop-effect>> 0 ] dip set-ulong-nth\r
             S_OK\r
         ] [ ! DragLeave\r
             drop S_OK\r
         ] [ ! Drop\r
-            >r 2drop nip\r
-            filenames-from-data-object\r
-            dup length 1 = [\r
-                first unparse [ "USE: parser " % % " run-file" % ] "" make\r
-                eval-listener\r
-                DROPEFFECT_COPY\r
-            ] [ 2drop DROPEFFECT_NONE ] if\r
-            0 r> set-ulong-nth\r
+            [\r
+                2drop nip\r
+                filenames-from-data-object\r
+                dup length 1 = [\r
+                    first unparse [ "USE: parser " % % " run-file" % ] "" make\r
+                    eval-listener\r
+                    DROPEFFECT_COPY\r
+                ] [ 2drop DROPEFFECT_NONE ] if\r
+                0\r
+            ] dip set-ulong-nth\r
             S_OK\r
         ]\r
     } }\r
index 7fd90acbe87b5b32df1e6c94be81f163cda1e255..c38b5f94ca8324a2c6b03b6192f4e5409b0b32ae 100755 (executable)
@@ -987,8 +987,6 @@ FUNCTION: DWORD GetFileType ( HANDLE hFile ) ;
 FUNCTION: DWORD GetFullPathNameW ( LPCTSTR lpFileName, DWORD nBufferLength, LPTSTR lpBuffer, LPTSTR* lpFilePart ) ;
 ALIAS: GetFullPathName GetFullPathNameW
 
-!  clear "license.txt" 32768 "char[32768]" <c-object> f over >r GetFullPathName r> swap 2 * head >string .
-
 ! FUNCTION: GetGeoInfoA
 ! FUNCTION: GetGeoInfoW
 ! FUNCTION: GetHandleContext
index 836a85d52de6fb5716569da1a83fc9393f41e216..e2be36c4504c0d18f05300f18088067362373309 100644 (file)
@@ -10,7 +10,7 @@ USING: kernel hashtables xml-rpc xml calendar sequences
        { "divide" [ / ] } } ;
 
 : apply-function ( name args -- {number} )
-    >r functions hash r> first2 rot call 1array ;
+    [ functions hash ] dip first2 rot call 1array ;
 
 : problem>solution ( xml-doc -- xml-doc )
     receive-rpc dup rpc-method-name swap rpc-method-params
index 9472f5e09d5cb5a795e1c4c207f6713b5a325b88..602fb90172b64b7fb74aa2da06dc7148f1aa26e5 100644 (file)
@@ -55,7 +55,7 @@ M: base64 item>xml
     "params" build-tag* ;
 
 : method-call ( name seq -- xml )
-    params >r "methodName" build-tag r>
+    params [ "methodName" build-tag ] dip
     2array "methodCall" build-tag* build-xml ;
 
 : return-params ( seq -- xml )
@@ -117,7 +117,7 @@ TAG: boolean xml>item
 : unstruct-member ( tag -- )
     children-tags first2
     first-child-tag xml>item
-    >r children>string r> swap set ;
+    [ children>string ] dip swap set ;
 
 TAG: struct xml>item
     [
@@ -158,10 +158,10 @@ TAG: array xml>item
 
 : post-rpc ( rpc url -- rpc )
     ! This needs to do something in the event of an error
-    >r send-rpc r> http-post nip string>xml receive-rpc ;
+    [ send-rpc ] dip http-post nip string>xml receive-rpc ;
 
 : invoke-method ( params method url -- )
-    >r swap <rpc-method> r> post-rpc ;
+    [ swap <rpc-method> ] dip post-rpc ;
 
 : put-http-response ( string -- )
     "HTTP/1.1 200 OK\nConnection: close\nContent-Length: " write
index 16da4be1d3eefeab1d95a3ed6c0147c139c131f5..f8f1788bcf2b9fc234504a1067c742c3a256216c 100644 (file)
@@ -8,12 +8,13 @@ TUPLE: mode file file-name-glob first-line-glob ;
 <TAGS: parse-mode-tag ( modes tag -- )
 
 TAG: MODE
-    "NAME" over at >r
-    mode new {
-        { "FILE" f (>>file) }
-        { "FILE_NAME_GLOB" f (>>file-name-glob) }
-        { "FIRST_LINE_GLOB" f (>>first-line-glob) }
-    } init-from-tag r>
+    "NAME" over at [
+        mode new {
+            { "FILE" f (>>file) }
+            { "FILE_NAME_GLOB" f (>>file-name-glob) }
+            { "FIRST_LINE_GLOB" f (>>first-line-glob) }
+        } init-from-tag
+    ] dip
     rot set-at ;
 
 TAGS>
@@ -56,7 +57,7 @@ SYMBOL: rule-sets
     [ get-rule-set nip swap (>>delegate) ] [ 2drop ] if ;
 
 : each-rule ( rule-set quot -- )
-    >r rules>> values concat r> each ; inline
+    [ rules>> values concat ] dip each ; inline
 
 : resolve-delegates ( ruleset -- )
     [ resolve-delegate ] each-rule ;
@@ -65,8 +66,7 @@ SYMBOL: rule-sets
     over [ dupd update ] [ nip clone ] if ;
 
 : import-keywords ( parent child -- )
-    over >r [ keywords>> ] bi@ ?update
-    r> (>>keywords) ;
+    over [ [ keywords>> ] bi@ ?update ] dip (>>keywords) ;
 
 : import-rules ( parent child -- )
     swap [ add-rule ] curry each-rule ;
@@ -115,5 +115,5 @@ ERROR: mutually-recursive-rulesets ruleset ;
 
 : find-mode ( file-name first-line -- mode )
     modes
-    [ nip >r 2dup r> suitable-mode? ] assoc-find
-    2drop >r 2drop r> [ "text" ] unless* ;
+    [ nip [ 2dup ] dip suitable-mode? ] assoc-find
+    2drop [ 2drop ] dip [ "text" ] unless* ;
index cbebe090c33676bf68372c39f8c86c0ec7736612..9b53000e026658a79c6639d3a3a4ef9d850ee715 100644 (file)
@@ -101,4 +101,4 @@ TAGS>
 : init-eol-span-tag ( -- ) [ drop init-eol-span ] , ;
 
 : parse-keyword-tag ( tag keyword-map -- )
-    >r dup main>> string>token swap children>string r> set-at ;
+    [ dup main>> string>token swap children>string ] dip set-at ;
index f777eaa18ca4b5d9d63a4b8b5afc1e5dfe132042..c37d60df147f6dbda49b0b0c719243657aa481c0 100644 (file)
@@ -69,7 +69,7 @@ M: string-matcher text-matches?
     ] keep string>> length and ;
 
 M: regexp text-matches?
-    >r >string r> match-head ;
+    [ >string ] dip match-head ;
 
 : rule-start-matches? ( rule -- match-count/f )
     dup start>> tuck swap can-match-here? [
@@ -97,7 +97,7 @@ DEFER: get-rules
     f swap rules>> at ?push-all ;
 
 : get-char-rules ( vector/f char ruleset -- vector/f )
-    >r ch>upper r> rules>> at ?push-all ;
+    [ ch>upper ] dip rules>> at ?push-all ;
 
 : get-rules ( char ruleset -- seq )
     f -rot [ get-char-rules ] keep get-always-rules ;
index 7b28bcfcdf0109034bd13138ccfc8e9dde497daa..44d3a0285e41a040723c821896cdfb23e16d12c5 100644 (file)
@@ -20,14 +20,14 @@ SYMBOLS: line last-offset position context
     current-rule-set keywords>> ;
 
 : token, ( from to id -- )
-    2over = [ 3drop ] [ >r line get subseq r> <token> , ] if ;
+    2over = [ 3drop ] [ [ line get subseq ] dip <token> , ] if ;
 
 : prev-token, ( id -- )
-    >r last-offset get position get r> token,
+    [ last-offset get position get ] dip token,
     position get last-offset set ;
 
 : next-token, ( len id -- )
-    >r position get 2dup + r> token,
+    [ position get 2dup + ] dip token,
     position get + dup 1- position set last-offset set ;
 
 : push-context ( rules -- )
index e4f12bcc49314d0a9debc17ef90b5dbea6a26a5a..adc43d7bb6b6364521eb220c564af61dfbcd6436 100644 (file)
@@ -41,7 +41,7 @@ MEMO: standard-rule-set ( id -- ruleset )
 
 : ?push-all ( seq1 seq2 -- seq1+seq2 )
     [
-        over [ >r V{ } like r> over push-all ] [ nip ] if
+        over [ [ V{ } like ] dip over push-all ] [ nip ] if
     ] when* ;
 
 : rule-set-no-word-sep* ( ruleset -- str )
@@ -107,8 +107,7 @@ M: regexp text-hash-char drop f ;
     text-hash-char [ suffix ] when* ;
 
 : add-rule ( rule ruleset -- )
-    >r dup rule-chars* >upper swap
-    r> rules>> inverted-index ;
+    [ dup rule-chars* >upper swap ] dip rules>> inverted-index ;
 
 : add-escape-rule ( string ruleset -- )
     over [
index 69fc08742bebf7a3d6233264b5a184bdcc89e239..b5a2f6eb98eeacc068575c6b44ef4a31c1d0131a 100644 (file)
@@ -53,5 +53,5 @@ SYMBOL: tag-handler-word
 
 : TAGS>
     tag-handler-word get
-    tag-handlers get >alist [ >r dup main>> r> case ] curry
+    tag-handlers get >alist [ [ dup main>> ] dip case ] curry
     define ; parsing
index b3c3cb88e4cefdc8a89644ebbdf759531dab8315..61d178ccf857192e092d9ff9f44c7cd30a47d8e8 100644 (file)
@@ -380,12 +380,11 @@ tuple
     { "over" "kernel" }
     { "pick" "kernel" }
     { "swap" "kernel" }
-    { ">r" "kernel" }
-    { "r>" "kernel" }
     { "eq?" "kernel" }
     { "tag" "kernel.private" }
     { "slot" "slots.private" }
     { "get-local" "locals.backend" }
+    { "load-local" "locals.backend" }
     { "drop-locals" "locals.backend" }
 } [ make-sub-primitive ] assoc-each