factor: ;FUNCTOR -> FUNCTOR;

LC_ALL=C find . -type f -name '*.factor' -exec sed -i '' 's/;FUNCTOR/FUNCTOR;/g' {} +
locals-and-roots
Doug Coleman 2016-06-06 16:06:48 -07:00
parent 7003d7e735
commit 77db8f128f
26 changed files with 41 additions and 41 deletions

View File

@ -41,7 +41,7 @@ M: T cord-append
2dup [ T instance? ] both? 2dup [ T instance? ] both?
[ T-cord boa ] [ generic-cord boa ] if ; inline [ T-cord boa ] [ generic-cord boa ] if ; inline
;FUNCTOR FUNCTOR;
: cord-map ( cord quot -- cord' ) : cord-map ( cord quot -- cord' )
[ [ head>> ] dip call ] [ [ head>> ] dip call ]

View File

@ -103,7 +103,7 @@ M: A vs* [ * \ T c-type-clamp ] 2map ; inline
M: A v*high [ * \ T heap-size neg shift ] 2map ; inline M: A v*high [ * \ T heap-size neg shift ] 2map ; inline
;FUNCTOR FUNCTOR;
: specialized-array-vocab ( c-type -- vocab ) : specialized-array-vocab ( c-type -- vocab )
[ [

View File

@ -56,7 +56,7 @@ SYNTAX: V{ \ } [ >V ] parse-literal ;
INSTANCE: V specialized-vector ; INSTANCE: V specialized-vector ;
INSTANCE: V growable ; INSTANCE: V growable ;
;FUNCTOR FUNCTOR;
: specialized-vector-vocab ( c-type -- vocab ) : specialized-vector-vocab ( c-type -- vocab )
[ [

View File

@ -32,4 +32,4 @@ M: V equal? over V instance? [ sequence= ] [ 2drop f ] if ;
INSTANCE: V growable ; INSTANCE: V growable ;
;FUNCTOR FUNCTOR;

View File

@ -191,7 +191,7 @@ WHERE
: NAME>=< ( obj1 obj2 -- >=< ) : NAME>=< ( obj1 obj2 -- >=< )
NAME<=> invert-comparison ; NAME<=> invert-comparison ;
;FUNCTOR" FUNCTOR;"
} }
} }
{ $slide "Example of sorting functor" { $slide "Example of sorting functor"

View File

@ -81,7 +81,7 @@ M: pixel-format-attribute >PFA
: >PFA-int-array ( attribute -- int-array ) : >PFA-int-array ( attribute -- int-array )
[ >PFA ] map concat PERM prepend 0 suffix int >c-array ; [ >PFA ] map concat PERM prepend 0 suffix int >c-array ;
;FUNCTOR FUNCTOR;
SYNTAX: PIXEL-FORMAT-ATTRIBUTE-TABLE: SYNTAX: PIXEL-FORMAT-ATTRIBUTE-TABLE:
scan-token scan-object scan-object ";" expect define-pixel-format-attribute-table ; scan-token scan-object scan-object ";" expect define-pixel-format-attribute-table ;

View File

@ -29,4 +29,4 @@ T-class lookup-c-type
complex >>boxed-class complex >>boxed-class
drop drop
;FUNCTOR FUNCTOR;

View File

@ -27,6 +27,6 @@ M: F-destructor dispose alien>> F N ndrop ;
: |F ( alien -- alien ) dup <F-destructor> |dispose drop ; inline : |F ( alien -- alien ) dup <F-destructor> |dispose drop ; inline
;FUNCTOR FUNCTOR;
SYNTAX: destructor: scan-word define-destructor ; SYNTAX: destructor: scan-word define-destructor ;

View File

@ -54,7 +54,7 @@ M: T S>>
M: T S<< M: T S<<
[ (n)>> ] [ (vectored)>> S>> ] bi set-nth-unsafe ; inline [ (n)>> ] [ (vectored)>> S>> ] bi set-nth-unsafe ; inline
;FUNCTOR FUNCTOR;
PRIVATE> PRIVATE>
@ -111,7 +111,7 @@ M: T-array struct-transpose
dup length [ nip iota ] [ drop ] [ nip (vectored-T) ] 2tri dup length [ nip iota ] [ drop ] [ nip (vectored-T) ] 2tri
[ [ [ nth ] [ set-nth ] bi-curry* bi ] 2curry each ] keep ; inline [ [ [ nth ] [ set-nth ] bi-curry* bi ] 2curry each ] keep ; inline
;FUNCTOR FUNCTOR;
SYNTAX: VECTORED-STRUCT: SYNTAX: VECTORED-STRUCT:
scan-word define-vectored-struct ; scan-word define-vectored-struct ;

View File

@ -77,7 +77,7 @@ symbol: name-outs
: name-out ( bb -- set ) name-outs get at ; : name-out ( bb -- set ) name-outs get at ;
;FUNCTOR FUNCTOR;
! ! ! Forward dataflow analysis ! ! ! Forward dataflow analysis
@ -103,7 +103,7 @@ INSTANCE: name forward-analysis ;
name run-dataflow-analysis name run-dataflow-analysis
[ name-ins set ] [ name-outs set ] bi* ; [ name-ins set ] [ name-outs set ] bi* ;
;FUNCTOR FUNCTOR;
! ! ! Backward dataflow analysis ! ! ! Backward dataflow analysis
@ -129,7 +129,7 @@ INSTANCE: name backward-analysis ;
\ name run-dataflow-analysis \ name run-dataflow-analysis
[ name-outs set ] [ name-ins set ] bi* ; [ name-outs set ] [ name-ins set ] bi* ;
;FUNCTOR FUNCTOR;
PRIVATE> PRIVATE>

View File

@ -83,6 +83,6 @@ insn-classes get [ insn-temp-slots empty? ] reject [
define define
] each ] each
;FUNCTOR FUNCTOR;
SYNTAX: RENAMING: scan-token scan-object scan-object scan-object ";" expect define-renaming ; SYNTAX: RENAMING: scan-token scan-object scan-object scan-object ";" expect define-renaming ;

View File

@ -16,7 +16,7 @@ TUPLE: B { value T } ;
C: <B> B ( T -- B ) ; C: <B> B ( T -- B ) ;
;FUNCTOR FUNCTOR;
\ float define-box \ float define-box
@ -38,7 +38,7 @@ WHERE
: WW ( a -- b ) \ W twice ; : WW ( a -- b ) \ W twice ;
;FUNCTOR FUNCTOR;
\ sq wrapper-test \ sq wrapper-test
@ -56,7 +56,7 @@ WHERE
: W ( a b -- c ) \ + execute ; : W ( a b -- c ) \ + execute ;
;FUNCTOR FUNCTOR;
"blah" wrapper-test-2 "blah" wrapper-test-2
@ -74,7 +74,7 @@ WHERE
symbol: W symbol: W
;FUNCTOR FUNCTOR;
"blorgh" symbol-test "blorgh" symbol-test
@ -94,7 +94,7 @@ GENERIC: W ( a -- b ) ;
M: object W ; M: object W ;
M: integer W 1 + ; M: integer W 1 + ;
;FUNCTOR FUNCTOR;
"snurv" generic-test "snurv" generic-test
@ -141,7 +141,7 @@ GENERIC: W-generic ( a -- b ) ;
M: W-tuple W-generic ; M: W-tuple W-generic ;
symbol: W-symbol symbol: W-symbol
;FUNCTOR FUNCTOR;
[ [ ] ] [ [ [ ] ] [
"in: functors.tests "in: functors.tests
@ -165,7 +165,7 @@ STRUCT: T-class
{ z TYPE initial: 5 } { z TYPE initial: 5 }
{ float { c:float 2 } } ; { float { c:float 2 } } ;
;FUNCTOR FUNCTOR;
"a-struct" "nemo" c:char 2 define-a-struct "a-struct" "nemo" c:char 2 define-a-struct
@ -223,7 +223,7 @@ WHERE
: W ( -- ) ; inline : W ( -- ) ; inline
: W-W ( -- ) W W ; : W-W ( -- ) W W ;
;FUNCTOR FUNCTOR;
"an-inline-word" define-an-inline-word "an-inline-word" define-an-inline-word
@ -245,7 +245,7 @@ TUPLE: T ; final
: W ( -- ) ; : W ( -- ) ;
;FUNCTOR FUNCTOR;
"a-final-tuple" "a-word" define-a-final-class "a-final-tuple" "a-word" define-a-final-class

View File

@ -153,7 +153,7 @@ SYNTAX: DEFINES-PRIVATE [ begin-private create-word-in end-private ] (INTERPOLAT
SYNTAX: DEFINES-CLASS [ create-class-in ] (INTERPOLATE) ; SYNTAX: DEFINES-CLASS [ create-class-in ] (INTERPOLATE) ;
defer: ;FUNCTOR delimiter defer: FUNCTOR; delimiter
<PRIVATE <PRIVATE
@ -175,7 +175,7 @@ defer: ;FUNCTOR delimiter
functor-words [ functor-words [
"WHERE" parse-bindings drop "WHERE" parse-bindings drop
[ swap <def> suffix ] { } assoc>map concat [ swap <def> suffix ] { } assoc>map concat
\ ;FUNCTOR parse-until [ ] append-as \ FUNCTOR; parse-until [ ] append-as
qualified-vocabs pop* ! unuse the bindings qualified-vocabs pop* ! unuse the bindings
] with-lambda-scope ; ] with-lambda-scope ;

View File

@ -18,5 +18,5 @@ TUPLE: promise quot forced? value ;
: make-lazy-quot ( quot effect -- quot ) : make-lazy-quot ( quot effect -- quot )
in>> length '[ _ _ ncurry <promise> ] ; in>> length '[ _ _ ncurry <promise> ] ;
SYNTAX: LAZY: SYNTAX: \ LAZY:
(:) [ make-lazy-quot ] [ 2nip ] 3bi define-declared ; (:) [ make-lazy-quot ] [ 2nip ] 3bi define-declared ;

View File

@ -11,7 +11,7 @@ MACRO: shuffle-effect ( effect -- quot )
[ [ of '[ _ swap nth ] ] with map ] 2bi [ [ of '[ _ swap nth ] ] with map ] 2bi
'[ @ _ cleave ] ; '[ @ _ cleave ] ;
SYNTAX: shuffle( SYNTAX: \ shuffle(
")" parse-effect suffix! \ shuffle-effect suffix! ; ")" parse-effect suffix! \ shuffle-effect suffix! ;
: tuck ( x y -- y x y ) swap over ; inline deprecated : tuck ( x y -- y x y ) swap over ; inline deprecated

View File

@ -41,7 +41,7 @@ M: bad-tr summary
PRIVATE> PRIVATE>
SYNTAX: TR: SYNTAX: \ TR:
scan-token parse-definition scan-token parse-definition
unclip-last [ unclip-last ] dip compute-tr unclip-last [ unclip-last ] dip compute-tr
[ check-tr ] [ check-tr ]

View File

@ -71,6 +71,6 @@ M: CLASS-array like drop dup CLASS-array? [ >CLASS-array ] unless ; inline
INSTANCE: CLASS-array sequence ; INSTANCE: CLASS-array sequence ;
;FUNCTOR FUNCTOR;
SYNTAX: TUPLE-ARRAY: scan-word define-tuple-array ; SYNTAX: \ TUPLE-ARRAY: scan-word define-tuple-array ;

View File

@ -31,7 +31,7 @@ SYNTAX: !NAME (parse-annotation) \ (NAME) suffix! ;
: NAMEs. ( -- ) : NAMEs. ( -- )
NAMEs sorted-definitions. ; NAMEs sorted-definitions. ;
;FUNCTOR FUNCTOR;
CONSTANT: annotation-tags { CONSTANT: annotation-tags {
"XXX" "TODO" "FIXME" "BUG" "REVIEW" "LICENSE" "XXX" "TODO" "FIXME" "BUG" "REVIEW" "LICENSE"

View File

@ -296,7 +296,7 @@ SYNTAX: XMATRIX{ \ } [ >MATRIX ] parse-literal ;
M: MATRIX pprint-delims M: MATRIX pprint-delims
drop \ XMATRIX{ \ } ; drop \ XMATRIX{ \ } ;
;FUNCTOR FUNCTOR;
: define-real-blas-matrix ( TYPE T -- ) : define-real-blas-matrix ( TYPE T -- )

View File

@ -184,7 +184,7 @@ SYNTAX: XVECTOR{ \ } [ >VECTOR ] parse-literal ;
M: VECTOR pprint-delims M: VECTOR pprint-delims
drop \ XVECTOR{ \ } ; drop \ XVECTOR{ \ } ;
;FUNCTOR FUNCTOR;
FUNCTOR: (define-real-blas-vector) ( TYPE T -- ) FUNCTOR: (define-real-blas-vector) ( TYPE T -- )
@ -205,7 +205,7 @@ M: VECTOR Vnorm
M: VECTOR Vasum M: VECTOR Vasum
(prepare-nrm2) XASUM ; (prepare-nrm2) XASUM ;
;FUNCTOR FUNCTOR;
FUNCTOR: (define-complex-blas-vector) ( TYPE C S -- ) FUNCTOR: (define-complex-blas-vector) ( TYPE C S -- )
@ -227,7 +227,7 @@ M: VECTOR Vnorm
M: VECTOR Vasum M: VECTOR Vasum
(prepare-nrm2) XXASUM ; (prepare-nrm2) XXASUM ;
;FUNCTOR FUNCTOR;
: define-real-blas-vector ( TYPE T -- ) : define-real-blas-vector ( TYPE T -- )

View File

@ -72,7 +72,7 @@ SYNTAX: A{ \ } [ >A ] parse-literal ;
A-rep >>rep A-rep >>rep
\ A typedef \ A typedef
;FUNCTOR FUNCTOR;
: define-simd-128-cord ( A/2 T -- ) : define-simd-128-cord ( A/2 T -- )
[ define-specialized-cord ] [ define-specialized-cord ]

View File

@ -329,7 +329,7 @@ c:<c-type>
A-rep >>rep A-rep >>rep
\ A c:typedef \ A c:typedef
;FUNCTOR FUNCTOR;
SYNTAX: SIMD-128: SYNTAX: SIMD-128:
scan-token define-simd-128 ; scan-token define-simd-128 ;

View File

@ -13,4 +13,4 @@ WHERE
: NAME<=> ( obj1 obj2 -- <=> ) QUOT compare ; : NAME<=> ( obj1 obj2 -- <=> ) QUOT compare ;
: NAME>=< ( obj1 obj2 -- >=< ) NAME<=> invert-comparison ; : NAME>=< ( obj1 obj2 -- >=< ) NAME<=> invert-comparison ;
;FUNCTOR FUNCTOR;

View File

@ -57,4 +57,4 @@ M: TYPE equal? assoc= ;
M: TYPE hashcode* assoc-hashcode ; M: TYPE hashcode* assoc-hashcode ;
;FUNCTOR FUNCTOR;

View File

@ -55,7 +55,7 @@ PRIVATE>
*TYPE ; inline *TYPE ; inline
: unmarshall-TYPE*-free ( alien -- n ) : unmarshall-TYPE*-free ( alien -- n )
[ unmarshall-TYPE* ] keep add-malloc free ; [ unmarshall-TYPE* ] keep add-malloc free ;
;FUNCTOR FUNCTOR;
SYNTAX: PRIMITIVE-MARSHALLERS: SYNTAX: PRIMITIVE-MARSHALLERS:
";" parse-tokens [ define-primitive-marshallers ] each ; ";" parse-tokens [ define-primitive-marshallers ] each ;

View File

@ -20,4 +20,4 @@ MACRO: w-n* ( int -- quot ) dup '[ [ _ narray <collection> #1 ] dip [ _ firstn ]
: w-2* ( a b quot -- mapped ) 2 w-n* ; inline : w-2* ( a b quot -- mapped ) 2 w-n* ; inline
: w-3* ( a b c quot -- mapped ) 3 w-n* ; inline : w-3* ( a b c quot -- mapped ) 3 w-n* ; inline
: w-4* ( a b c d quot -- mapped ) 4 w-n* ; inline : w-4* ( a b c d quot -- mapped ) 4 w-n* ; inline
;FUNCTOR FUNCTOR;