From: Doug Coleman Date: Mon, 8 Jun 2015 19:38:38 +0000 (-0700) Subject: core: Rename create to create-word, create-in to create-word-in. X-Git-Tag: unmaintained~2655 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=6e60c811acc4097494d4f7e9ecbb9418d6585c29 core: Rename create to create-word, create-in to create-word-in. --- diff --git a/basis/alien/enums/enums.factor b/basis/alien/enums/enums.factor index 2056a5ad52..d833e96e4d 100644 --- a/basis/alien/enums/enums.factor +++ b/basis/alien/enums/enums.factor @@ -39,7 +39,7 @@ M: enum-c-type c-type-setter [ first define-singleton-class ] each ; : define-enum-constructor ( word -- ) - [ name>> "<" ">" surround create-in ] keep + [ name>> "<" ">" surround create-word-in ] keep [ number>enum ] curry ( number -- enum ) define-inline ; PRIVATE> diff --git a/basis/alien/parser/parser.factor b/basis/alien/parser/parser.factor index 8cc573f2c2..cd929dc704 100755 --- a/basis/alien/parser/parser.factor +++ b/basis/alien/parser/parser.factor @@ -41,7 +41,7 @@ ERROR: bad-array-type ; { [ dup "{" = ] [ drop \ } parse-until >array ] } { [ dup "pointer:" = ] [ drop scan-c-type ] } [ parse-c-type ] - } cond ; + } cond ; : reset-c-type ( word -- ) dup "struct-size" word-prop @@ -59,7 +59,7 @@ ERROR: *-in-c-type-name name ; [ *-in-c-type-name ] when ; : (CREATE-C-TYPE) ( word -- word ) - validate-c-type-name current-vocab create { + validate-c-type-name current-vocab create-word { [ fake-definition ] [ set-last-word ] [ reset-c-type ] @@ -133,7 +133,7 @@ PRIVATE> [ { } ] [ return-type-name 1array ] if-void ; : create-function ( name -- word ) - create-in dup reset-generic ; + create-word-in dup reset-generic ; :: (make-function) ( return function library types names -- quot effect ) return library function types function-quot @@ -150,7 +150,7 @@ PRIVATE> '[ [ _ _ _ ] dip alien-callback ] ; :: make-callback-type ( lib return type-name types names -- word quot effect ) - type-name current-vocab create :> type-word + type-name current-vocab create-word :> type-word type-word [ reset-generic ] [ reset-c-type ] bi void* type-word typedef type-word names return function-effect "callback-effect" set-word-prop @@ -185,7 +185,7 @@ PREDICATE: alien-callback-type-word < typedef-word [ nip ] [ global-quot ] 2bi ( -- value ) define-declared ; : define-global-setter ( type word -- ) - [ nip name>> "set-" prepend create-in ] + [ nip name>> "set-" prepend create-word-in ] [ set-global-quot ] 2bi ( obj -- ) define-declared ; : define-global ( type word -- ) diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index 262939d711..0b641b5c01 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -246,7 +246,7 @@ ERROR: no-objc-type name ; : define-objc-class-word ( quot name -- ) [ class-init-hooks get set-at ] [ - [ "cocoa.classes" create ] [ '[ _ objc-class ] ] bi + [ "cocoa.classes" create-word ] [ '[ _ objc-class ] ] bi ( -- class ) define-declared ] bi ; diff --git a/basis/cocoa/subclassing/subclassing.factor b/basis/cocoa/subclassing/subclassing.factor index 47f38a5442..f744a22755 100644 --- a/basis/cocoa/subclassing/subclassing.factor +++ b/basis/cocoa/subclassing/subclassing.factor @@ -64,7 +64,7 @@ IN: cocoa.subclassing :: define-objc-class ( name superclass protocols methods -- ) methods prepare-methods :> methods - name "cocoa.classes" create drop + name "cocoa.classes" create-word drop methods name redefine-objc-methods name [ methods protocols superclass name (define-objc-class) ] import-objc-class ; diff --git a/basis/compiler/cfg/hats/hats.factor b/basis/compiler/cfg/hats/hats.factor index fefb4faeea..099ce96827 100644 --- a/basis/compiler/cfg/hats/hats.factor +++ b/basis/compiler/cfg/hats/hats.factor @@ -11,7 +11,7 @@ IN: compiler.cfg.hats > "##" ?head drop "^^" prepend create-in ; + name>> "##" ?head drop "^^" prepend create-word-in ; : hat-quot ( insn -- quot ) [ diff --git a/basis/compiler/cfg/instructions/syntax/syntax.factor b/basis/compiler/cfg/instructions/syntax/syntax.factor index a0fb86852f..12fbe0745e 100644 --- a/basis/compiler/cfg/instructions/syntax/syntax.factor +++ b/basis/compiler/cfg/instructions/syntax/syntax.factor @@ -75,7 +75,7 @@ TUPLE: insn-slot-spec type name rep ; name>> "," append ; : define-insn-ctor ( class specs -- ) - [ [ insn-ctor-name create-in ] [ '[ _ ] [ f ] [ boa , ] surround ] bi ] dip + [ [ insn-ctor-name create-word-in ] [ '[ _ ] [ f ] [ boa , ] surround ] bi ] dip [ name>> ] map { } define-declared ; : define-insn ( class superclass specs -- ) diff --git a/basis/cpu/x86/assembler/syntax/syntax.factor b/basis/cpu/x86/assembler/syntax/syntax.factor index 6649345bea..fad4e14768 100644 --- a/basis/cpu/x86/assembler/syntax/syntax.factor +++ b/basis/cpu/x86/assembler/syntax/syntax.factor @@ -9,7 +9,7 @@ SYMBOL: registers registers [ H{ } clone ] initialize : define-register ( name num size -- word ) - [ create-in ] 2dip { + [ create-word-in ] 2dip { [ 2drop ] [ 2drop define-symbol ] [ drop "register" set-word-prop ] diff --git a/basis/functors/functors.factor b/basis/functors/functors.factor index 904a22d448..5f7eabe040 100644 --- a/basis/functors/functors.factor +++ b/basis/functors/functors.factor @@ -129,11 +129,11 @@ PRIVATE> SYNTAX: IS [ parse-word ] (INTERPOLATE) ; -SYNTAX: DEFERS [ current-vocab create ] (INTERPOLATE) ; +SYNTAX: DEFERS [ current-vocab create-word ] (INTERPOLATE) ; -SYNTAX: DEFINES [ create-in ] (INTERPOLATE) ; +SYNTAX: DEFINES [ create-word-in ] (INTERPOLATE) ; -SYNTAX: DEFINES-PRIVATE [ begin-private create-in end-private ] (INTERPOLATE) ; +SYNTAX: DEFINES-PRIVATE [ begin-private create-word-in end-private ] (INTERPOLATE) ; SYNTAX: DEFINES-CLASS [ create-class-in ] (INTERPOLATE) ; diff --git a/basis/gobject-introspection/ffi/ffi.factor b/basis/gobject-introspection/ffi/ffi.factor index 0735b58241..1bd1a953e1 100644 --- a/basis/gobject-introspection/ffi/ffi.factor +++ b/basis/gobject-introspection/ffi/ffi.factor @@ -12,7 +12,7 @@ IN: gobject-introspection.ffi : defer-c-type ( c-type-name -- c-type ) deferred-type swap (CREATE-C-TYPE) [ typedef ] keep ; -! create-in dup +! create-word-in dup ! [ fake-definition ] [ undefined-def define ] bi ; :: defer-types ( types type-info-class -- ) diff --git a/basis/gobject-introspection/standard-types/standard-types.factor b/basis/gobject-introspection/standard-types/standard-types.factor index 4435f439f8..9d630d6b82 100644 --- a/basis/gobject-introspection/standard-types/standard-types.factor +++ b/basis/gobject-introspection/standard-types/standard-types.factor @@ -38,7 +38,7 @@ int lookup-c-type clone [ >c-bool ] >>unboxer-quot [ c-bool> ] >>boxer-quot object >>boxed-class -"gboolean" create-in typedef +"gboolean" create-word-in typedef STRUCT: longdouble { data char[10] } ; >> diff --git a/basis/gobject-introspection/types/types.factor b/basis/gobject-introspection/types/types.factor index 463af64a1a..cd244cf9aa 100644 --- a/basis/gobject-introspection/types/types.factor +++ b/basis/gobject-introspection/types/types.factor @@ -108,5 +108,5 @@ void* lookup-c-type clone [ drop deferred-type-error ] >>unboxer-quot [ drop deferred-type-error ] >>boxer-quot object >>boxed-class -"deferred-type" create-in typedef +"deferred-type" create-word-in typedef >> diff --git a/basis/io/encodings/8-bit/8-bit.factor b/basis/io/encodings/8-bit/8-bit.factor index 17cb527073..8aec5cb496 100644 --- a/basis/io/encodings/8-bit/8-bit.factor +++ b/basis/io/encodings/8-bit/8-bit.factor @@ -41,7 +41,7 @@ M: 8-bit-encoding 8-bit-encodings get-global at ; : create-encoding ( name -- word ) - create-in + create-word-in [ define-singleton-class ] [ 8-bit-encoding add-mixin-instance ] [ ] tri ; diff --git a/basis/match/match.factor b/basis/match/match.factor index c9745a1055..341d967c08 100644 --- a/basis/match/match.factor +++ b/basis/match/match.factor @@ -9,7 +9,7 @@ IN: match SYMBOL: _ : define-match-var ( name -- ) - create-in + create-word-in dup t "match-var" set-word-prop dup [ get ] curry ( -- value ) define-declared ; diff --git a/basis/math/partial-dispatch/partial-dispatch.factor b/basis/math/partial-dispatch/partial-dispatch.factor index d360662679..0789086044 100644 --- a/basis/math/partial-dispatch/partial-dispatch.factor +++ b/basis/math/partial-dispatch/partial-dispatch.factor @@ -84,7 +84,7 @@ M: word integer-op-input-classes ] [ ] make ; : integer-op-word ( triple -- word ) - [ name>> ] map "-" join "math.partial-dispatch" create ; + [ name>> ] map "-" join "math.partial-dispatch" create-word ; : integer-op-quot ( fix-word big-word triple -- quot ) [ second ] [ third ] bi 2array { diff --git a/basis/math/vectors/simd/cords/cords.factor b/basis/math/vectors/simd/cords/cords.factor index 37f1d6db51..b87c603e4a 100644 --- a/basis/math/vectors/simd/cords/cords.factor +++ b/basis/math/vectors/simd/cords/cords.factor @@ -76,7 +76,7 @@ SYNTAX: A{ \ } [ >A ] parse-literal ; : define-simd-128-cord ( A/2 T -- ) [ define-specialized-cord ] - [ create-in (define-simd-128-cord) ] 2bi ; + [ create-word-in (define-simd-128-cord) ] 2bi ; SYNTAX: SIMD-128-CORD: scan-word scan-token define-simd-128-cord ; diff --git a/basis/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor index 5350fe491d..55de8b8e2f 100644 --- a/basis/openssl/libssl/libssl.factor +++ b/basis/openssl/libssl/libssl.factor @@ -445,7 +445,7 @@ H{ } clone verify-messages set-global : verify-message ( n -- word ) verify-messages get-global at ; SYNTAX: X509_V_: - scan-token "X509_V_" prepend create-in + scan-token "X509_V_" prepend create-word-in scan-number [ 1quotation ( -- value ) define-inline ] [ verify-messages get set-at ] diff --git a/basis/roman/roman.factor b/basis/roman/roman.factor index 391bc41dcb..346226bf4e 100644 --- a/basis/roman/roman.factor +++ b/basis/roman/roman.factor @@ -57,7 +57,7 @@ PRIVATE> << SYNTAX: ROMAN-OP: - scan-word [ name>> "roman" prepend create-in ] keep + scan-word [ name>> "roman" prepend create-word-in ] keep 1quotation '[ _ binary-roman-op ] scan-effect define-declared ; diff --git a/basis/tools/test/test.factor b/basis/tools/test/test.factor index 11ce24bfd2..762ce06176 100644 --- a/basis/tools/test/test.factor +++ b/basis/tools/test/test.factor @@ -106,7 +106,7 @@ MACRO: ( word -- ) SYNTAX: TEST: scan-token - [ create-in ] + [ create-word-in ] [ "(" ")" surround search '[ _ parse-test ] ] bi define-syntax ; diff --git a/basis/tr/tr.factor b/basis/tr/tr.factor index a76bf80dc2..b937b25b93 100644 --- a/basis/tr/tr.factor +++ b/basis/tr/tr.factor @@ -25,7 +25,7 @@ M: bad-tr summary { { byte-array } { string } } set-specializer ; : create-tr ( token -- word ) - create-in dup tr-hints ; + create-word-in dup tr-hints ; : tr-quot ( mapping -- quot ) '[ [ dup ascii? [ _ tr-nth ] when ] map ] ; diff --git a/basis/ui/pixel-formats/pixel-formats-docs.factor b/basis/ui/pixel-formats/pixel-formats-docs.factor index 75921eec44..684d87d0b5 100644 --- a/basis/ui/pixel-formats/pixel-formats-docs.factor +++ b/basis/ui/pixel-formats/pixel-formats-docs.factor @@ -5,7 +5,7 @@ IN: ui.pixel-formats ! break circular dependency << "ui.gadgets.worlds" create-vocab drop - "world" "ui.gadgets.worlds" create drop + "world" "ui.gadgets.worlds" create-word drop "ui.gadgets.worlds" vocab-words-assoc use-words >> diff --git a/basis/unicode/breaks/breaks.factor b/basis/unicode/breaks/breaks.factor index c6460c8edd..143768645e 100644 --- a/basis/unicode/breaks/breaks.factor +++ b/basis/unicode/breaks/breaks.factor @@ -97,7 +97,7 @@ SYMBOL: table graphemes iota { SpacingMark } connect { Prepend } graphemes iota connect ; -"grapheme-table" create-in +"grapheme-table" create-word-in graphemes init-table table [ make-grapheme-table finish-table ] with-variable define-constant @@ -164,7 +164,7 @@ CONSTANT: word-break-classes H{ { "ExtendNumLet" 12 } } -"word-break-table" create-in +"word-break-table" create-word-in "vocab:unicode/data/WordBreakProperty.txt" load-interval-file dup array>> [ 2 swap [ word-break-classes at ] change-nth ] each @@ -198,7 +198,7 @@ SYMBOL: check-number-after [ { { 0 [ f ] } { 1 [ t ] } [ ] } case ] map ] map ; -"word-table" create-in +"word-table" create-word-in unicode-words init-table table [ make-word-table finish-word-table ] with-variable define-constant diff --git a/basis/unicode/script/script.factor b/basis/unicode/script/script.factor index d973f8f712..278199e63b 100644 --- a/basis/unicode/script/script.factor +++ b/basis/unicode/script/script.factor @@ -7,7 +7,7 @@ IN: unicode.script > diff --git a/basis/windows/com/syntax/syntax.factor b/basis/windows/com/syntax/syntax.factor index a19f15b483..668c1871d3 100755 --- a/basis/windows/com/syntax/syntax.factor +++ b/basis/windows/com/syntax/syntax.factor @@ -53,11 +53,11 @@ ERROR: no-com-interface interface ; V{ } clone [ (parse-com-functions) ] keep >array ; : (iid-word) ( definition -- word ) - word>> name>> "-iid" append create-in ; + word>> name>> "-iid" append create-word-in ; : (function-word) ( function interface -- word ) swap [ word>> name>> "::" ] [ name>> ] bi* - 3append create-in ; + 3append create-word-in ; : family-tree ( definition -- definitions ) dup parent>> [ family-tree ] [ { } ] if* diff --git a/basis/xmode/tokens/tokens.factor b/basis/xmode/tokens/tokens.factor index 8a5d8afbf6..d76c7ff65a 100644 --- a/basis/xmode/tokens/tokens.factor +++ b/basis/xmode/tokens/tokens.factor @@ -13,7 +13,7 @@ SYMBOL: tokens "KEYWORD4" "LABEL" "LITERAL1" "LITERAL2" "LITERAL3" "LITERAL4" "MARKUP" "OPERATOR" "END" "NULL" } [ - dup create-in dup define-symbol + dup create-word-in dup define-symbol ] H{ } map>assoc tokens set-global >> diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index e6cc5209df..27bd5cf6b3 100755 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -52,7 +52,7 @@ num-types get f builtins set call( -- ) ! syntax-quot -! Create some empty vocabs where the below primitives and +! create-word some empty vocabs where the below primitives and ! classes will go { "alien" @@ -118,7 +118,7 @@ call( -- ) ! syntax-quot tri ; : prepare-slots ( slots -- slots' ) - [ [ dup pair? [ first2 create ] when ] map ] map ; + [ [ dup pair? [ first2 create-word ] when ] map ] map ; : define-builtin-slots ( class slots -- ) prepare-slots make-slots 1 finalize-slots @@ -130,38 +130,38 @@ call( -- ) ! syntax-quot : define-builtin ( symbol slotspec -- ) [ [ define-builtin-predicate ] keep ] dip define-builtin-slots ; -"fixnum" "math" create register-builtin -"bignum" "math" create register-builtin -"tuple" "kernel" create register-builtin -"float" "math" create register-builtin +"fixnum" "math" create-word register-builtin +"bignum" "math" create-word register-builtin +"tuple" "kernel" create-word register-builtin +"float" "math" create-word register-builtin "f" "syntax" lookup-word register-builtin -"array" "arrays" create register-builtin -"wrapper" "kernel" create register-builtin -"callstack" "kernel" create register-builtin -"string" "strings" create register-builtin -"quotation" "quotations" create register-builtin -"dll" "alien" create register-builtin -"alien" "alien" create register-builtin -"word" "words" create register-builtin -"byte-array" "byte-arrays" create register-builtin +"array" "arrays" create-word register-builtin +"wrapper" "kernel" create-word register-builtin +"callstack" "kernel" create-word register-builtin +"string" "strings" create-word register-builtin +"quotation" "quotations" create-word register-builtin +"dll" "alien" create-word register-builtin +"alien" "alien" create-word register-builtin +"word" "words" create-word register-builtin +"byte-array" "byte-arrays" create-word register-builtin ! We need this before defining c-ptr below "f" "syntax" lookup-word { } define-builtin -"f" "syntax" create [ not ] "predicate" set-word-prop +"f" "syntax" create-word [ not ] "predicate" set-word-prop "f?" "syntax" vocab-words-assoc delete-at "t" "syntax" lookup-word define-singleton-class ! Some unions -"c-ptr" "alien" create [ +"c-ptr" "alien" create-word [ "alien" "alien" lookup-word , "f" "syntax" lookup-word , "byte-array" "byte-arrays" lookup-word , ] { } make define-union-class ! A predicate class used for declarations -"array-capacity" "sequences.private" create +"array-capacity" "sequences.private" create-word "fixnum" "math" lookup-word [ [ dup 0 fixnum>= ] % @@ -175,7 +175,7 @@ define-predicate-class "coercer" set-word-prop ! Catch-all class for providing a default method. -"object" "kernel" create +"object" "kernel" create-word [ f f { } intersection-class define-class ] [ [ drop t ] "predicate" set-word-prop ] bi @@ -183,51 +183,51 @@ bi "object?" "kernel" vocab-words-assoc delete-at ! Empty class with no instances -"null" "kernel" create +"null" "kernel" create-word [ f { } f union-class define-class ] [ [ drop f ] "predicate" set-word-prop ] bi "null?" "kernel" vocab-words-assoc delete-at -"fixnum" "math" create { } define-builtin -"fixnum" "math" create "integer>fixnum-strict" "math" create 1quotation "coercer" set-word-prop +"fixnum" "math" create-word { } define-builtin +"fixnum" "math" create-word "integer>fixnum-strict" "math" create-word 1quotation "coercer" set-word-prop -"bignum" "math" create { } define-builtin -"bignum" "math" create ">bignum" "math" create 1quotation "coercer" set-word-prop +"bignum" "math" create-word { } define-builtin +"bignum" "math" create-word ">bignum" "math" create-word 1quotation "coercer" set-word-prop -"float" "math" create { } define-builtin -"float" "math" create ">float" "math" create 1quotation "coercer" set-word-prop +"float" "math" create-word { } define-builtin +"float" "math" create-word ">float" "math" create-word 1quotation "coercer" set-word-prop -"array" "arrays" create { +"array" "arrays" create-word { { "length" { "array-capacity" "sequences.private" } read-only } } define-builtin -"wrapper" "kernel" create { +"wrapper" "kernel" create-word { { "wrapped" read-only } } define-builtin -"string" "strings" create { +"string" "strings" create-word { { "length" { "array-capacity" "sequences.private" } read-only } "aux" } define-builtin -"quotation" "quotations" create { +"quotation" "quotations" create-word { { "array" { "array" "arrays" } read-only } "cached-effect" "cache-counter" } define-builtin -"dll" "alien" create { +"dll" "alien" create-word { { "path" { "byte-array" "byte-arrays" } read-only } } define-builtin -"alien" "alien" create { +"alien" "alien" create-word { { "underlying" { "c-ptr" "alien" } read-only } "expired" } define-builtin -"word" "words" create { +"word" "words" create-word { { "hashcode" { "fixnum" "math" } } "name" "vocabulary" @@ -238,32 +238,32 @@ bi { "sub-primitive" read-only } } define-builtin -"byte-array" "byte-arrays" create { +"byte-array" "byte-arrays" create-word { { "length" { "array-capacity" "sequences.private" } read-only } } define-builtin -"callstack" "kernel" create { } define-builtin +"callstack" "kernel" create-word { } define-builtin -"tuple" "kernel" create +"tuple" "kernel" create-word [ { } define-builtin ] [ define-tuple-layout ] bi -! Create special tombstone values -"tombstone" "hashtables.private" create +! create-word special tombstone values +"tombstone" "hashtables.private" create-word tuple { "state" } define-tuple-class -"((empty))" "hashtables.private" create +"((empty))" "hashtables.private" create-word { f } "tombstone" "hashtables.private" lookup-word slots>tuple 1quotation ( -- value ) define-inline -"((tombstone))" "hashtables.private" create +"((tombstone))" "hashtables.private" create-word { t } "tombstone" "hashtables.private" lookup-word slots>tuple 1quotation ( -- value ) define-inline ! Some tuple classes -"curry" "kernel" create +"curry" "kernel" create-word tuple { { "obj" read-only } @@ -285,7 +285,7 @@ tuple } cleave ( obj quot -- curry ) define-declared -"compose" "kernel" create +"compose" "kernel" create-word tuple { { "first" read-only } @@ -311,7 +311,7 @@ tuple ! Sub-primitive words : make-sub-primitive ( word vocab effect -- ) [ - create + create-word dup t "primitive" set-word-prop dup 1quotation ] dip define-declared ; @@ -385,7 +385,7 @@ tuple : make-primitive ( word vocab function effect -- ) [ [ - create + create-word dup reset-word dup t "primitive" set-word-prop ] dip @@ -558,6 +558,6 @@ tuple } [ first4 make-primitive ] each ! Bump build number -"build" "kernel" create build 1 + [ ] curry ( -- n ) define-declared +"build" "kernel" create-word build 1 + [ ] curry ( -- n ) define-declared ] with-compilation-unit diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 651beae234..d103915eab 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -96,7 +96,7 @@ IN: bootstrap.syntax "<<<<<<<" "=======" ">>>>>>>" - } [ "syntax" create drop ] each + } [ "syntax" create-word drop ] each "t" "syntax" lookup-word define-symbol ] with-compilation-unit diff --git a/core/classes/classes.factor b/core/classes/classes.factor index 5aa0d97c24..6d7039dcdf 100644 --- a/core/classes/classes.factor +++ b/core/classes/classes.factor @@ -73,7 +73,7 @@ PRIVATE> PREDICATE: predicate < word "predicating" word-prop >boolean ; : create-predicate-word ( word -- predicate ) - [ name>> "?" append ] [ vocabulary>> ] bi create + [ name>> "?" append ] [ vocabulary>> ] bi create-word dup predicate? [ dup reset-generic ] unless ; GENERIC: class-of ( object -- class ) diff --git a/core/classes/parser/parser.factor b/core/classes/parser/parser.factor index 568c49065f..7802a1ab87 100644 --- a/core/classes/parser/parser.factor +++ b/core/classes/parser/parser.factor @@ -7,7 +7,7 @@ IN: classes.parser location remember-class ; : create-class-in ( string -- word ) - current-vocab create + current-vocab create-word dup t "defining-class" set-word-prop dup set-last-word dup save-class-location diff --git a/core/parser/parser-docs.factor b/core/parser/parser-docs.factor index e391ddc704..0d30bdd9b8 100644 --- a/core/parser/parser-docs.factor +++ b/core/parser/parser-docs.factor @@ -123,7 +123,7 @@ HELP: save-location HELP: bad-number { $error-description "Indicates the parser encountered an invalid numeric literal." } ; -HELP: create-in +HELP: create-word-in { $values { "str" "a word name" } { "word" "a new word" } } { $description "Creates a word in the current vocabulary. Until re-defined, the word throws an error when invoked." } $parsing-note ; diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 55ea673c3c..d561d909e4 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -203,7 +203,6 @@ DEFER: foo [ f ] [ "IN: parser.tests : x ( -- ) ;" "a" parse-stream drop - "y" "parser.tests" lookup-word ] unit-test @@ -551,7 +550,7 @@ EXCLUDE: qualified.tests.bar => x ; [ t ] [ "was-once-a-word-bug" "parser.tests" lookup-word >boolean ] unit-test [ [ ] ] [ - "IN: parser.tests USE: words << \"was-once-a-word-bug\" \"parser.tests\" create [ ] ( -- ) define-declared >>" + "IN: parser.tests USE: words << \"was-once-a-word-bug\" \"parser.tests\" create-word [ ] ( -- ) define-declared >>" "was-once-a-word-test" parse-stream ] unit-test @@ -630,7 +629,7 @@ EXCLUDE: qualified.tests.bar => x ; [ "vocabs.loader.test.l" use-vocab ] must-fail [ f ] [ "vocabs.loader.test.l" manifest get search-vocab-names>> in? ] unit-test [ ] [ "vocabs.loader.test.l" unuse-vocab ] unit-test - [ f ] [ "vocabs.loader.test.l" manifest get search-vocab-names>> in? ] unit-test + [ f ] [ "vocabs.loader.test.l" manifest get search-vocab-names>> in? ] unit-test ] with-file-vocabs ! Test cases for #183 diff --git a/core/parser/parser.factor b/core/parser/parser.factor index 04ff5cb7a5..eb2c332320 100644 --- a/core/parser/parser.factor +++ b/core/parser/parser.factor @@ -17,8 +17,8 @@ IN: parser M: parsing-word stack-effect drop ( parsed -- parsed ) ; -: create-in ( str -- word ) - current-vocab create dup set-last-word dup save-location ; +: create-word-in ( str -- word ) + current-vocab create-word dup set-last-word dup save-location ; SYMBOL: auto-use? @@ -29,7 +29,7 @@ SYMBOL: auto-use? dup vocabulary>> [ auto-use-vocab ] [ "Added \"" "\" vocabulary to search path" surround note. ] bi - ] [ create-in ] if ; + ] [ create-word-in ] if ; : ignore-forwards ( seq -- seq' ) [ forward-reference? ] reject ; @@ -81,7 +81,7 @@ ERROR: invalid-word-name string ; [ invalid-word-name ] when ; : scan-new ( -- word ) - scan-word-name create-in ; + scan-word-name create-word-in ; : scan-new-word ( -- word ) scan-new dup reset-generic ; diff --git a/core/slots/slots.factor b/core/slots/slots.factor index 1c1eec61c6..aed7499673 100644 --- a/core/slots/slots.factor +++ b/core/slots/slots.factor @@ -39,7 +39,7 @@ M: object reader-quot ] [ ] make ; : reader-word ( name -- word ) - ">>" append "accessors" create + ">>" append "accessors" create-word dup t "reader" set-word-prop ; : reader-props ( slot-spec -- assoc ) @@ -60,7 +60,7 @@ M: object reader-quot ] 2bi ; : writer-word ( name -- word ) - "<<" append "accessors" create + "<<" append "accessors" create-word dup t "writer" set-word-prop ; ERROR: bad-slot-value value class ; @@ -107,7 +107,7 @@ M: object writer-quot ] 2bi ; : setter-word ( name -- word ) - ">>" prepend "accessors" create ; + ">>" prepend "accessors" create-word ; : define-setter ( name -- ) dup setter-word dup deferred? [ @@ -116,7 +116,7 @@ M: object writer-quot ] [ 2drop ] if ; : changer-word ( name -- word ) - "change-" prepend "accessors" create ; + "change-" prepend "accessors" create-word ; : define-changer ( name -- ) dup changer-word dup deferred? [ diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index c115a3c369..2d805a2c4f 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -127,7 +127,7 @@ IN: bootstrap.syntax ] define-core-syntax "SYMBOLS:" [ - ";" [ create-in [ reset-generic ] [ define-symbol ] bi ] each-token + ";" [ create-word-in [ reset-generic ] [ define-symbol ] bi ] each-token ] define-core-syntax "SINGLETONS:" [ @@ -135,7 +135,7 @@ IN: bootstrap.syntax ] define-core-syntax "DEFER:" [ - scan-token current-vocab create + scan-token current-vocab create-word [ fake-definition ] [ set-last-word ] [ undefined-def define ] tri ] define-core-syntax diff --git a/core/vocabs/loader/loader-tests.factor b/core/vocabs/loader/loader-tests.factor index 76e4e8b2b3..073f9804d2 100644 --- a/core/vocabs/loader/loader-tests.factor +++ b/core/vocabs/loader/loader-tests.factor @@ -84,7 +84,7 @@ IN: vocabs.loader.tests [ ] [ [ - "bob" "vocabs.loader.test.b" create [ ] define + "bob" "vocabs.loader.test.b" create-word [ ] define ] with-compilation-unit ] unit-test diff --git a/core/vocabs/parser/parser-tests.factor b/core/vocabs/parser/parser-tests.factor index aae7efc04e..1cd2d309a9 100644 --- a/core/vocabs/parser/parser-tests.factor +++ b/core/vocabs/parser/parser-tests.factor @@ -20,7 +20,7 @@ must-fail-with [ aaa ] [ "uutt" search ] unit-test [ aaa ] [ "vocabs.parser.tests:aaa" search ] unit-test - [ ] [ [ "bbb" "vocabs.parser.tests" create drop ] with-compilation-unit ] unit-test + [ ] [ [ "bbb" "vocabs.parser.tests" create-word drop ] with-compilation-unit ] unit-test [ "bbb" ] [ "vocabs.parser.tests:bbb" search name>> ] unit-test @@ -34,18 +34,18 @@ must-fail-with [ ] [ "vocabs.parser.tests.foo" set-current-vocab ] unit-test - [ ] [ [ "bbb" current-vocab create drop ] with-compilation-unit ] unit-test - + [ ] [ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] unit-test + [ t ] [ "bbb" search >boolean ] unit-test [ ] [ [ "vocabs.parser.tests.foo" forget-vocab ] with-compilation-unit ] unit-test - - [ [ "bbb" current-vocab create drop ] with-compilation-unit ] [ error>> no-current-vocab-error? ] must-fail-with + + [ [ "bbb" current-vocab create-word drop ] with-compilation-unit ] [ error>> no-current-vocab-error? ] must-fail-with [ begin-private ] [ error>> no-current-vocab-error? ] must-fail-with [ end-private ] [ error>> no-current-vocab-error? ] must-fail-with [ f ] [ "bbb" search >boolean ] unit-test - + ] with-manifest diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index b4651651d4..5e7b8d85fc 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -9,8 +9,8 @@ $nl $nl "Parsing words add definitions to the current vocabulary. When a source file is being parsed, the current vocabulary is initially set to " { $vocab-link "scratchpad" } ". The current vocabulary may be changed with the " { $link POSTPONE: IN: } " parsing word (see " { $link "word-search" } ")." { $subsections - create - create-in + create-word + create-word-in lookup-word } ; @@ -246,13 +246,13 @@ $low-level-note HELP: { $values { "name" string } { "vocab" string } { "word" word } } -{ $description "Allocates a word with the specified name and vocabulary. User code should call " { $link } " to create uninterned words and " { $link create } " to create interned words, instead of calling this constructor directly." } +{ $description "Allocates a word with the specified name and vocabulary. User code should call " { $link } " to create uninterned words and " { $link create-word } " to create interned words, instead of calling this constructor directly." } { $notes "This word must be called from inside " { $link with-compilation-unit } "." } ; HELP: { $values { "name" string } { "word" word } } { $description "Creates an uninterned word with the specified name, that is not equal to any other word in the system." } -{ $notes "Unlike " { $link create } ", this word does not have to be called from inside " { $link with-compilation-unit } "." } ; +{ $notes "Unlike " { $link create-word } ", this word does not have to be called from inside " { $link with-compilation-unit } "." } ; HELP: gensym { $values { "word" word } } @@ -262,7 +262,7 @@ HELP: gensym "( gensym )" } } -{ $notes "Unlike " { $link create } ", this word does not have to be called from inside " { $link with-compilation-unit } "." } ; +{ $notes "Unlike " { $link create-word } ", this word does not have to be called from inside " { $link with-compilation-unit } "." } ; HELP: bootstrapping? { $var-description "Set by the library while bootstrap is in progress. Some parsing words need to behave differently during bootstrap." } ; @@ -286,17 +286,17 @@ HELP: lookup-word HELP: reveal { $values { "word" word } } -{ $description "Adds a newly-created word to the dictionary. Usually this word does not need to be called directly, and is only called as part of " { $link create } "." } ; +{ $description "Adds a newly-created word to the dictionary. Usually this word does not need to be called directly, and is only called as part of " { $link create-word } "." } ; HELP: check-create { $values { "name" string } { "vocab" string } } { $description "Throws a " { $link check-create } " error if " { $snippet "name" } " or " { $snippet "vocab" } " is not a string." } -{ $error-description "Thrown if " { $link create } " is called with invalid parameters." } ; +{ $error-description "Thrown if " { $link create-word } " is called with invalid parameters." } ; -HELP: create +HELP: create-word { $values { "name" string } { "vocab" string } { "word" word } } { $description "Creates a new word. If the vocabulary already contains a word with the requested name, outputs the existing word. The vocabulary must exist already; if it does not, you must call " { $link create-vocab } " first." } -{ $notes "This word must be called from inside " { $link with-compilation-unit } ". Parsing words should call " { $link create-in } " instead of this word." } ; +{ $notes "This word must be called from inside " { $link with-compilation-unit } ". Parsing words should call " { $link create-word-in } " instead of this word." } ; HELP: constructor-word { $values { "name" string } { "vocab" string } { "word" word } } diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index 18914bcacb..ca5c6ad3fd 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -6,7 +6,7 @@ IN: words.tests [ 4 ] [ [ - "poo" "words.tests" create [ 2 2 + ] ( -- n ) define-declared + "poo" "words.tests" create-word [ 2 2 + ] ( -- n ) define-declared ] with-compilation-unit "poo" "words.tests" lookup-word execute ] unit-test @@ -25,7 +25,7 @@ DEFER: plist-test \ plist-test "sample-property" word-prop ] unit-test -[ ] [ [ "create-test" "scratchpad" create { 1 2 } "testing" set-word-prop ] with-compilation-unit ] unit-test +[ ] [ [ "create-test" "scratchpad" create-word { 1 2 } "testing" set-word-prop ] with-compilation-unit ] unit-test [ { 1 2 } ] [ "create-test" "scratchpad" lookup-word "testing" word-prop @@ -34,7 +34,7 @@ DEFER: plist-test [ [ t ] [ \ array? "array?" "arrays" lookup-word = ] unit-test - [ ] [ [ "test-scope" "scratchpad" create drop ] with-compilation-unit ] unit-test + [ ] [ [ "test-scope" "scratchpad" create-word drop ] with-compilation-unit ] unit-test ] with-scope [ "test-scope" ] [ @@ -73,7 +73,7 @@ DEFER: deferred [ ] [ "IN: words.tests FORGET: not-compiled" eval( -- ) ] unit-test -[ ] [ [ "no-loc" "words.tests" create drop ] with-compilation-unit ] unit-test +[ ] [ [ "no-loc" "words.tests" create-word drop ] with-compilation-unit ] unit-test [ f ] [ "no-loc" "words.tests" lookup-word where ] unit-test [ ] [ "IN: words.tests : no-loc-2 ( -- ) ;" eval( -- ) ] unit-test diff --git a/core/words/words.factor b/core/words/words.factor index 7b0f922e98..37f7f7b0dd 100644 --- a/core/words/words.factor +++ b/core/words/words.factor @@ -210,7 +210,7 @@ ERROR: bad-create name vocab ; 2dup [ string? ] [ [ string? ] [ vocab? ] bi or ] bi* and [ bad-create ] unless ; -: create ( name vocab -- word ) +: create-word ( name vocab -- word ) check-create 2dup lookup-word [ 2nip ] [ vocab-name @@ -219,7 +219,7 @@ ERROR: bad-create name vocab ; ] if* ; : constructor-word ( name vocab -- word ) - [ "<" ">" surround ] dip create ; + [ "<" ">" surround ] dip create-word ; PREDICATE: parsing-word < word "parsing" word-prop ; diff --git a/extra/constructors/constructors.factor b/extra/constructors/constructors.factor index 4690fa140a..c1a5ef55d0 100644 --- a/extra/constructors/constructors.factor +++ b/extra/constructors/constructors.factor @@ -38,7 +38,7 @@ ERROR: unknown-constructor-parameters class effect unknown ; [ constructor-boa-quot ] keep define-declared ; : create-reset ( string -- word ) - create-in dup reset-generic ; + create-word-in dup reset-generic ; : scan-constructor ( -- word class ) scan-new-word scan-class ; diff --git a/extra/cpu/8080/emulator/emulator.factor b/extra/cpu/8080/emulator/emulator.factor index 41f7f24a74..557bddc6f7 100644 --- a/extra/cpu/8080/emulator/emulator.factor +++ b/extra/cpu/8080/emulator/emulator.factor @@ -1377,7 +1377,7 @@ SYMBOL: last-opcode #! that would implement that instruction. dup " " join instruction-quotations [ - "_" join [ "emulate-" % % ] "" make create-in + "_" join [ "emulate-" % % ] "" make create-word-in dup last-instruction set-global ] dip ( cpu -- ) define-declared ; diff --git a/extra/cuda/syntax/syntax.factor b/extra/cuda/syntax/syntax.factor index e3173995e2..0be2df2f14 100644 --- a/extra/cuda/syntax/syntax.factor +++ b/extra/cuda/syntax/syntax.factor @@ -10,9 +10,9 @@ SYNTAX: CUDA-LIBRARY: [ current-cuda-library set-global ] bi ; SYNTAX: CUDA-FUNCTION: - scan-token [ create-in current-cuda-library get ] keep + scan-token [ create-word-in current-cuda-library get ] keep ";" scan-c-args drop define-cuda-function ; SYNTAX: CUDA-GLOBAL: - scan-token [ create-in current-cuda-library get ] keep + scan-token [ create-word-in current-cuda-library get ] keep define-cuda-global ; diff --git a/extra/game/worlds/worlds.factor b/extra/game/worlds/worlds.factor index d48aa94f65..2f1284a3fe 100644 --- a/extra/game/worlds/worlds.factor +++ b/extra/game/worlds/worlds.factor @@ -79,7 +79,7 @@ M: game-world apply-world-attributes f swap open-window* dup promise>> ?promise drop ; : define-attributes-word ( word tuple -- ) - [ name>> "-attributes" append create-in ] dip define-constant ; + [ name>> "-attributes" append create-word-in ] dip define-constant ; SYNTAX: GAME: scan-new-word diff --git a/extra/gml/macros/macros.factor b/extra/gml/macros/macros.factor index 74c6208ea4..ca635a3fbd 100644 --- a/extra/gml/macros/macros.factor +++ b/extra/gml/macros/macros.factor @@ -31,7 +31,7 @@ SYNTAX: LOG-GML: [let (GML:) :> ( word name effect def ) - name "-record" append create-in :> record-class + name "-record" append create-word-in :> record-class record-class tuple effect in>> define-tuple-class record-class def effect in>> length diff --git a/extra/gml/runtime/runtime.factor b/extra/gml/runtime/runtime.factor index b8f5e8c5e0..4b6424bdf9 100644 --- a/extra/gml/runtime/runtime.factor +++ b/extra/gml/runtime/runtime.factor @@ -186,7 +186,7 @@ global-dictionary [ H{ } clone ] initialize primitive-effect define-declared ; : scan-gml-name ( -- word name ) - scan-token [ "gml-" prepend create-in ] keep ; + scan-token [ "gml-" prepend create-word-in ] keep ; : (GML:) ( -- word name effect def ) scan-gml-name scan-effect parse-definition ; diff --git a/extra/project-euler/common/common.factor b/extra/project-euler/common/common.factor index 3fc7134254..ac5835fae5 100644 --- a/extra/project-euler/common/common.factor +++ b/extra/project-euler/common/common.factor @@ -158,7 +158,7 @@ PRIVATE> SYNTAX: SOLUTION: scan-word - [ name>> "-main" append create-in ] keep + [ name>> "-main" append create-word-in ] keep [ drop current-vocab main<< ] [ [ . ] swap prefix ( -- ) define-declared ] 2bi ; diff --git a/extra/python/syntax/syntax.factor b/extra/python/syntax/syntax.factor index 17be91a8d0..fecc028a3f 100644 --- a/extra/python/syntax/syntax.factor +++ b/extra/python/syntax/syntax.factor @@ -35,7 +35,7 @@ SYMBOL: current-context : make-factor-words ( module name prefix? -- call-word obj-word ) [ [ ":" glue ] [ ":$" glue ] 2bi ] [ nip dup "$" prepend ] if - [ create-in ] bi@ ; + [ create-word-in ] bi@ ; : import-getattr ( module name -- alien ) [ py-import ] dip getattr ; @@ -50,10 +50,10 @@ SYMBOL: current-context '[ @ rot _ getattr -rot call-object-full @ ] ; : method-callable ( name effect -- ) - [ dup create-in swap ] dip [ make-method-quot ] keep define-inline ; + [ dup create-word-in swap ] dip [ make-method-quot ] keep define-inline ; : method-object ( name -- ) - [ "$" prepend create-in ] [ '[ _ getattr ] ] bi + [ "$" prepend create-word-in ] [ '[ _ getattr ] ] bi { "obj" } { "obj'" } define-inline ; : add-method ( name effect -- ) diff --git a/extra/variants/variants.factor b/extra/variants/variants.factor index 3fd92e11f9..7450f29ff8 100644 --- a/extra/variants/variants.factor +++ b/extra/variants/variants.factor @@ -14,7 +14,7 @@ M: variant-class initial-value* : define-tuple-class-and-boa-word ( class superclass slots -- ) pick [ define-tuple-class ] dip - dup name>> "<" ">" surround create-in swap define-boa-word ; + dup name>> "<" ">" surround create-word-in swap define-boa-word ; : define-variant-member ( member -- class ) dup array? [ first3 pick [ define-tuple-class-and-boa-word ] dip ] [ dup define-singleton-class ] if ; diff --git a/unmaintained/alien/cxx/cxx.factor b/unmaintained/alien/cxx/cxx.factor index 1e788d4713..a8449b84f5 100644 --- a/unmaintained/alien/cxx/cxx.factor +++ b/unmaintained/alien/cxx/cxx.factor @@ -12,7 +12,7 @@ IN: alien.cxx create-class-in [ define-mixin-class ] keep ; : class-tuple-word ( word -- word' ) - "#" append create-in ; + "#" append create-word-in ; : define-class-tuple ( word mixin -- ) [ drop class-wrapper { } define-tuple-class ] diff --git a/unmaintained/alien/marshall/structs/structs.factor b/unmaintained/alien/marshall/structs/structs.factor index 4eabc4428c..07ebb6a0ca 100644 --- a/unmaintained/alien/marshall/structs/structs.factor +++ b/unmaintained/alien/marshall/structs/structs.factor @@ -27,7 +27,7 @@ IN: alien.marshall.structs : define-struct-constructor ( class -- ) { - [ name>> "<" prepend ">" append create-in ] + [ name>> "<" prepend ">" append create-word-in ] [ '[ _ new ] ] [ name>> '[ _ malloc-struct >>underlying ] append ] [ name>> 1array ] @@ -35,7 +35,7 @@ IN: alien.marshall.structs PRIVATE> :: define-struct-tuple ( name -- ) - name create-in :> class + name create-word-in :> class class struct-wrapper { } define-tuple-class class define-struct-constructor name c-type fields>> [ diff --git a/unmaintained/modules/rpc/rpc.factor b/unmaintained/modules/rpc/rpc.factor index b394090d55..7558ad9481 100644 --- a/unmaintained/modules/rpc/rpc.factor +++ b/unmaintained/modules/rpc/rpc.factor @@ -11,7 +11,7 @@ TUPLE: rpc-request args vocabspec wordname ; serialize flush deserialize dup no-vocab? [ throw ] when ; :: define-remote ( str effect addrspec vocabspec -- ) - str create-in effect [ in>> length ] [ out>> length ] bi + str create-word-in effect [ in>> length ] [ out>> length ] bi '[ _ narray vocabspec str rpc-request boa addrspec 9012 binary [ "doer" serialize send-with-check ] with-client _ firstn ] effect define-declared ; diff --git a/unmaintained/semantic-db/semantic-db.factor b/unmaintained/semantic-db/semantic-db.factor index c703869456..c4bb7728a3 100644 --- a/unmaintained/semantic-db/semantic-db.factor +++ b/unmaintained/semantic-db/semantic-db.factor @@ -207,7 +207,7 @@ C: relation-definition ] if ; : (define-relation-word) ( id-word name>> definition -- id-word ) - >r create-in over [ execute ] curry r> compose define ; + >r create-word-in over [ execute ] curry r> compose define ; : define-relation-word ( relation-definition id-word given-word-name word-type definition -- relation-definition id-word ) >r >r [ @@ -229,7 +229,7 @@ C: relation-definition [ ensure-context ensure-relation ] 2curry define ; : create-id-word ( relation-definition -- id-word ) - dup id-word>> "id-word" choose-word-name create-in ; + dup id-word>> "id-word" choose-word-name create-word-in ; PRIVATE>