From 93de179c2fb478fa7a9aeb7b388706d0f636f707 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Wed, 28 Oct 2009 15:29:01 -0500 Subject: [PATCH] over push -> suffix!, over push-all -> append! --- basis/alien/syntax/syntax.factor | 2 +- basis/classes/struct/struct.factor | 8 ++++---- basis/fry/fry.factor | 2 +- basis/functors/functors.factor | 8 ++++---- basis/interpolate/interpolate.factor | 2 +- basis/io/ports/ports.factor | 4 ++-- basis/locals/locals.factor | 8 ++++---- basis/peg/parsers/parsers.factor | 2 +- basis/peg/peg.factor | 2 +- basis/random/random.factor | 2 +- basis/xmode/rules/rules.factor | 2 +- core/effects/parser/parser.factor | 2 +- core/sequences/sequences.factor | 2 +- extra/closures/closures.factor | 6 +++--- extra/fonts/syntax/syntax.factor | 2 +- extra/fries/fries.factor | 6 +++--- extra/gpu/demos/bunny/bunny.factor | 2 +- extra/infix/infix.factor | 2 +- extra/project-euler/017/017.factor | 2 +- extra/project-euler/038/038.factor | 2 +- extra/project-euler/040/040.factor | 2 +- extra/ui/gadgets/controls/controls.factor | 6 +++--- extra/ui/gadgets/layout/layout.factor | 8 ++++---- 23 files changed, 42 insertions(+), 42 deletions(-) diff --git a/basis/alien/syntax/syntax.factor b/basis/alien/syntax/syntax.factor index c51a446b6c..609ed2826d 100644 --- a/basis/alien/syntax/syntax.factor +++ b/basis/alien/syntax/syntax.factor @@ -37,7 +37,7 @@ ERROR: no-such-symbol name library ; 2dup load-library dlsym [ 2nip ] [ no-such-symbol ] if* ; SYNTAX: &: - scan "c-library" get '[ _ _ address-of ] over push-all ; + scan "c-library" get '[ _ _ address-of ] append! ; : global-quot ( type word -- quot ) name>> "c-library" get '[ _ _ address-of 0 ] diff --git a/basis/classes/struct/struct.factor b/basis/classes/struct/struct.factor index 417f188c3c..d5e5fdc6c3 100755 --- a/basis/classes/struct/struct.factor +++ b/basis/classes/struct/struct.factor @@ -350,7 +350,7 @@ PRIVATE> : parse-struct-slots ( slots -- slots' more? ) scan { { ";" [ f ] } - { "{" [ parse-struct-slot over push t ] } + { "{" [ parse-struct-slot suffix! t ] } { f [ unexpected-eof ] } [ invalid-struct-slot ] } case ; @@ -378,7 +378,7 @@ SYNTAX: S@ : parse-struct-slot` ( accum -- accum ) scan-string-param scan-c-type` \ } parse-until - [ over push ] 3curry over push-all ; + [ suffix! ] 3curry append! ; : parse-struct-slots` ( accum -- accum more? ) scan { @@ -390,9 +390,9 @@ PRIVATE> FUNCTOR-SYNTAX: STRUCT: scan-param suffix! - [ 8 ] over push-all + [ 8 ] append! [ parse-struct-slots` ] [ ] while - [ >array define-struct-class ] over push-all ; + [ >array define-struct-class ] append! ; USING: vocabs vocabs.loader ; diff --git a/basis/fry/fry.factor b/basis/fry/fry.factor index 046da86b7b..d68e2d13a8 100644 --- a/basis/fry/fry.factor +++ b/basis/fry/fry.factor @@ -53,4 +53,4 @@ M: callable deep-fry M: object deep-fry , ; -SYNTAX: '[ parse-quotation fry over push-all ; +SYNTAX: '[ parse-quotation fry append! ; diff --git a/basis/functors/functors.factor b/basis/functors/functors.factor index 1d11d78b33..56aa6f0d1b 100644 --- a/basis/functors/functors.factor +++ b/basis/functors/functors.factor @@ -43,7 +43,7 @@ M: object (fake-quotations>) , ; : parse-definition* ( accum -- accum ) parse-definition >fake-quotations suffix! - [ fake-quotations> first ] over push-all ; + [ fake-quotations> first ] append! ; : parse-declared* ( accum -- accum ) complete-effect @@ -74,7 +74,7 @@ FUNCTOR-SYNTAX: MIXIN: FUNCTOR-SYNTAX: M: scan-param suffix! scan-param suffix! - [ create-method-in dup method-body set ] over push-all + [ create-method-in dup method-body set ] append! parse-definition* \ define* suffix! ; @@ -82,7 +82,7 @@ FUNCTOR-SYNTAX: C: scan-param suffix! scan-param suffix! complete-effect - [ [ [ boa ] curry ] over push-all ] dip suffix! + [ [ [ boa ] curry ] append! ] dip suffix! \ define-declared* suffix! ; FUNCTOR-SYNTAX: : @@ -114,7 +114,7 @@ FUNCTOR-SYNTAX: MACRO: parse-declared* \ define-macro suffix! ; -FUNCTOR-SYNTAX: inline [ word make-inline ] over push-all ; +FUNCTOR-SYNTAX: inline [ word make-inline ] append! ; FUNCTOR-SYNTAX: call-next-method T{ fake-call-next-method } suffix! ; diff --git a/basis/interpolate/interpolate.factor b/basis/interpolate/interpolate.factor index ea965aac5b..6e5f68fcdf 100644 --- a/basis/interpolate/interpolate.factor +++ b/basis/interpolate/interpolate.factor @@ -40,4 +40,4 @@ MACRO: interpolate ( string -- ) SYNTAX: I[ "]I" parse-multiline-string - interpolate-locals over push-all ; + interpolate-locals append! ; diff --git a/basis/io/ports/ports.factor b/basis/io/ports/ports.factor index 8cdd1d97bd..3ea4c105f5 100644 --- a/basis/io/ports/ports.factor +++ b/basis/io/ports/ports.factor @@ -53,7 +53,7 @@ M: input-port stream-read-partial ( max stream -- byte-array/f ) : read-loop ( count port accum -- ) pick over length - dup 0 > [ pick read-step dup [ - over push-all read-loop + append! read-loop ] [ 2drop 2drop ] if @@ -78,7 +78,7 @@ M: input-port stream-read : read-until-loop ( seps port buf -- separator/f ) 2over read-until-step over [ - [ over push-all ] dip dup [ + [ append! ] dip dup [ [ 3drop ] dip ] [ drop read-until-loop diff --git a/basis/locals/locals.factor b/basis/locals/locals.factor index 4f908aaf06..aa0a064c0d 100644 --- a/basis/locals/locals.factor +++ b/basis/locals/locals.factor @@ -9,13 +9,13 @@ SYNTAX: :> scan locals get [ :>-outside-lambda-error ] unless* [ make-local ] bind suffix! ; -SYNTAX: [| parse-lambda over push-all ; +SYNTAX: [| parse-lambda append! ; -SYNTAX: [let parse-let over push-all ; +SYNTAX: [let parse-let append! ; -SYNTAX: [let* parse-let* over push-all ; +SYNTAX: [let* parse-let* append! ; -SYNTAX: [wlet parse-wlet over push-all ; +SYNTAX: [wlet parse-wlet append! ; SYNTAX: :: (::) define-declared ; diff --git a/basis/peg/parsers/parsers.factor b/basis/peg/parsers/parsers.factor index 850b585190..c8a8080f38 100644 --- a/basis/peg/parsers/parsers.factor +++ b/basis/peg/parsers/parsers.factor @@ -40,7 +40,7 @@ M: just-parser (compile) ( parser -- quot ) diff --git a/basis/peg/peg.factor b/basis/peg/peg.factor index 9e777b86af..4a247a8a0f 100644 --- a/basis/peg/peg.factor +++ b/basis/peg/peg.factor @@ -634,7 +634,7 @@ SYNTAX: PEG: word swap effect define-declared ] ] with-compilation-unit - ] over push-all + ] append! ] ; USING: vocabs vocabs.loader ; diff --git a/basis/random/random.factor b/basis/random/random.factor index 0e7a0cc3f1..bfd107dbb6 100755 --- a/basis/random/random.factor +++ b/basis/random/random.factor @@ -19,7 +19,7 @@ M: object random-bytes* ( n tuple -- byte-array ) [ pick '[ _ random-32* 4 >le _ push-all ] times ] [ over zero? - [ 2drop ] [ random-32* 4 >le swap head over push-all ] if + [ 2drop ] [ random-32* 4 >le swap head append! ] if ] bi-curry bi* ; M: object random-32* ( tuple -- r ) 4 swap random-bytes* le> ; diff --git a/basis/xmode/rules/rules.factor b/basis/xmode/rules/rules.factor index 51f216fa44..ffe6db3b46 100644 --- a/basis/xmode/rules/rules.factor +++ b/basis/xmode/rules/rules.factor @@ -43,7 +43,7 @@ MEMO: standard-rule-set ( id -- ruleset ) : ?push-all ( seq1 seq2 -- seq1+seq2 ) [ - over [ [ V{ } like ] dip over push-all ] [ nip ] if + over [ [ V{ } like ] dip append! ] [ nip ] if ] when* ; : rule-set-no-word-sep* ( ruleset -- str ) diff --git a/core/effects/parser/parser.factor b/core/effects/parser/parser.factor index da27dc28b4..d57fbd9707 100644 --- a/core/effects/parser/parser.factor +++ b/core/effects/parser/parser.factor @@ -35,4 +35,4 @@ ERROR: stack-effect-omits-dashes effect ; "(" expect ")" parse-effect ; : parse-call( ( accum word -- accum ) - [ ")" parse-effect ] dip 2array over push-all ; + [ ")" parse-effect ] dip 2array append! ; diff --git a/core/sequences/sequences.factor b/core/sequences/sequences.factor index 8e15f73ed7..a32c9381a6 100755 --- a/core/sequences/sequences.factor +++ b/core/sequences/sequences.factor @@ -741,7 +741,7 @@ PRIVATE> : concat-as ( seq exemplar -- newseq ) swap [ { } ] [ [ sum-lengths over new-resizable ] keep - [ over push-all ] each + [ append! ] each ] if-empty swap like ; : concat ( seq -- newseq ) diff --git a/extra/closures/closures.factor b/extra/closures/closures.factor index 79fcf7564e..faa8ec07ee 100644 --- a/extra/closures/closures.factor +++ b/extra/closures/closures.factor @@ -4,10 +4,10 @@ SYMBOL: | ! Selective Binding : delayed-bind-with ( vars quot -- quot' ) '[ _ dup [ get ] map zip >hashtable [ _ bind ] curry ] ; -SYNTAX: C[ | parse-until parse-quotation delayed-bind-with over push-all ; +SYNTAX: C[ | parse-until parse-quotation delayed-bind-with append! ; ! Common ones -SYNTAX: DIR[ parse-quotation { current-directory } swap delayed-bind-with over push-all ; +SYNTAX: DIR[ parse-quotation { current-directory } swap delayed-bind-with append! ; ! Namespace Binding : bind-to-namespace ( quot -- quot' ) '[ namespace [ _ bind ] curry ] ; -SYNTAX: NS[ parse-quotation bind-to-namespace over push-all ; \ No newline at end of file +SYNTAX: NS[ parse-quotation bind-to-namespace append! ; diff --git a/extra/fonts/syntax/syntax.factor b/extra/fonts/syntax/syntax.factor index c296dfb3df..34ccbc8aa8 100644 --- a/extra/fonts/syntax/syntax.factor +++ b/extra/fonts/syntax/syntax.factor @@ -13,4 +13,4 @@ SYNTAX: FONT: \ ; parse-until { [ [ italic = ] find nip [ >>italic? ] install ] [ [ bold = ] find nip [ >>bold? ] install ] [ [ fontname? ] find nip [ >>name* ] install ] -} cleave 4array concat '[ dup font>> @ drop ] over push-all ; +} cleave 4array concat '[ dup font>> @ drop ] append! ; diff --git a/extra/fries/fries.factor b/extra/fries/fries.factor index f67d0d7cd3..133e8913dd 100644 --- a/extra/fries/fries.factor +++ b/extra/fries/fries.factor @@ -8,6 +8,6 @@ IN: fries [ unclip-last [ [ spin 1array glue ] reduce-r ] 2curry ] [ length 1 - 1 [ call-effect ] 2curry ] bi ; -SYNTAX: i" parse-string rest "_" str-fry over push-all ; -SYNTAX: i{ \ } parse-until >array { _ } gen-fry over push-all ; -SYNTAX: iV{ \ } parse-until >vector V{ _ } gen-fry over push-all ; +SYNTAX: i" parse-string rest "_" str-fry append! ; +SYNTAX: i{ \ } parse-until >array { _ } gen-fry append! ; +SYNTAX: iV{ \ } parse-until >vector V{ _ } gen-fry append! ; diff --git a/extra/gpu/demos/bunny/bunny.factor b/extra/gpu/demos/bunny/bunny.factor index a741af8002..09853263ce 100755 --- a/extra/gpu/demos/bunny/bunny.factor +++ b/extra/gpu/demos/bunny/bunny.factor @@ -107,7 +107,7 @@ UNIFORM-TUPLE: loading-uniforms [ numbers { { [ dup length 5 = ] [ pick push ] } - { [ dup first 3 = ] [ rest over push-all ] } + { [ dup first 3 = ] [ rest append! ] } [ drop ] } cond ] each-line-tokens ; inline diff --git a/extra/infix/infix.factor b/extra/infix/infix.factor index 4530d6c5c4..ab578124f8 100644 --- a/extra/infix/infix.factor +++ b/extra/infix/infix.factor @@ -93,4 +93,4 @@ PRIVATE> SYNTAX: [infix| "|" parse-bindings "infix]" parse-infix-locals - ?rewrite-closures over push-all ; + ?rewrite-closures append! ; diff --git a/extra/project-euler/017/017.factor b/extra/project-euler/017/017.factor index 53513691ff..827e478da0 100644 --- a/extra/project-euler/017/017.factor +++ b/extra/project-euler/017/017.factor @@ -24,7 +24,7 @@ IN: project-euler.017 ! -------- : euler017 ( -- answer ) - 1000 [1,b] SBUF" " clone [ number>text over push-all ] reduce [ Letter? ] count ; + 1000 [1,b] SBUF" " clone [ number>text append! ] reduce [ Letter? ] count ; ! [ euler017 ] 100 ave-time ! 15 ms ave run time - 1.71 SD (100 trials) diff --git a/extra/project-euler/038/038.factor b/extra/project-euler/038/038.factor index dd70051082..34b4cd91fa 100755 --- a/extra/project-euler/038/038.factor +++ b/extra/project-euler/038/038.factor @@ -39,7 +39,7 @@ IN: project-euler.038 pick length 8 > [ 2drop 10 digits>integer ] [ - [ * number>digits over push-all ] 2keep 1 + (concat-product) + [ * number>digits append! ] 2keep 1 + (concat-product) ] if ; : concat-product ( n -- m ) diff --git a/extra/project-euler/040/040.factor b/extra/project-euler/040/040.factor index a60714357e..09185e9a64 100755 --- a/extra/project-euler/040/040.factor +++ b/extra/project-euler/040/040.factor @@ -28,7 +28,7 @@ IN: project-euler.040 : (concat-upto) ( n limit str -- str ) 2dup length > [ - pick number>string over push-all rot 1 + -rot (concat-upto) + pick number>string append! [ 1 + ] 2dip (concat-upto) ] [ 2nip ] if ; diff --git a/extra/ui/gadgets/controls/controls.factor b/extra/ui/gadgets/controls/controls.factor index 0c7841b11f..5de6da8710 100644 --- a/extra/ui/gadgets/controls/controls.factor +++ b/extra/ui/gadgets/controls/controls.factor @@ -59,9 +59,9 @@ M: model-field model-changed 2dup model*>> = : ( init page min max step -- slider ) horizontal slider: ; : image-prep ( -- image ) scan current-vocab name>> "vocab:" "/icons/" surround ".tiff" surround dup cached-image drop ; -SYNTAX: IMG-MODEL-BTN: image-prep [ ] curry over push-all ; +SYNTAX: IMG-MODEL-BTN: image-prep [ ] curry append! ; -SYNTAX: IMG-BTN: image-prep [ swap