From c731dc6edb4ee901abbbe75679fce8349f13a217 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 6 Nov 2011 15:57:24 -0800 Subject: [PATCH] Rename lookup to lookup-word. --- basis/bootstrap/compiler/compiler.factor | 6 +- basis/bootstrap/image/image.factor | 2 +- .../cfg/instructions/syntax/syntax.factor | 12 ++-- basis/compiler/tests/folding.factor | 4 +- basis/compiler/tests/redefine11.factor | 4 +- basis/compiler/tests/redefine16.factor | 4 +- basis/compiler/tests/redefine18.factor | 2 +- basis/compiler/tests/redefine5.factor | 4 +- basis/compiler/tests/redefine6.factor | 4 +- basis/compiler/tests/redefine7.factor | 2 +- basis/compiler/tests/redefine8.factor | 2 +- basis/compiler/tests/redefine9.factor | 4 +- basis/functors/functors-tests.factor | 12 ++-- basis/furnace/utilities/utilities.factor | 2 +- basis/help/crossref/crossref-tests.factor | 6 +- .../help/definitions/definitions-tests.factor | 8 +-- basis/html/templates/chloe/chloe.factor | 2 +- basis/math/vectors/simd/simd-tests.factor | 4 +- basis/prettyprint/prettyprint-tests.factor | 4 +- basis/serialize/serialize.factor | 2 +- .../specialized-arrays-tests.factor | 2 +- .../specialized-arrays.factor | 10 +-- basis/tools/deploy/shaker/shaker.factor | 26 ++++---- basis/vocabs/metadata/metadata.factor | 2 +- core/bootstrap/primitives.factor | 24 +++---- core/bootstrap/syntax.factor | 2 +- core/classes/mixin/mixin-tests.factor | 12 ++-- core/classes/tuple/tuple-tests.factor | 18 +++--- core/classes/union/union-tests.factor | 12 ++-- core/generic/standard/standard-tests.factor | 4 +- core/io/io-tests.factor | 4 +- core/parser/parser-tests.factor | 64 +++++++++---------- core/syntax/syntax.factor | 8 +-- core/vocabs/loader/loader-tests.factor | 4 +- core/vocabs/parser/parser-tests.factor | 4 +- core/words/words-docs.factor | 4 +- core/words/words-tests.factor | 30 ++++----- core/words/words.factor | 6 +- extra/annotations/annotations-docs.factor | 6 +- extra/classes/struct/vectored/vectored.factor | 6 +- extra/graphviz/notation/notation.factor | 2 +- extra/llvm/types/types.factor | 4 +- .../tuple/persistent/persistent.factor | 2 +- extra/slots/syntax/syntax.factor | 4 +- extra/smalltalk/compiler/compiler.factor | 2 +- 45 files changed, 176 insertions(+), 176 deletions(-) diff --git a/basis/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor index 3d3a922687..7156c2d416 100644 --- a/basis/bootstrap/compiler/compiler.factor +++ b/basis/bootstrap/compiler/compiler.factor @@ -108,13 +108,13 @@ gc "." write flush os windows? [ - "GetLastError" "windows.kernel32" lookup - "FormatMessageW" "windows.kernel32" lookup + "GetLastError" "windows.kernel32" lookup-word + "FormatMessageW" "windows.kernel32" lookup-word 2array compile-unoptimized ] when os unix? [ - "(dlerror)" "alien.libraries.unix" lookup + "(dlerror)" "alien.libraries.unix" lookup-word 1array compile-unoptimized ] when diff --git a/basis/bootstrap/image/image.factor b/basis/bootstrap/image/image.factor index c2d12c4540..9de2c443af 100755 --- a/basis/bootstrap/image/image.factor +++ b/basis/bootstrap/image/image.factor @@ -458,7 +458,7 @@ M: tuple ' emit-tuple ; M: tombstone ' state>> "((tombstone))" "((empty))" ? - "hashtables.private" lookup def>> first + "hashtables.private" lookup-word def>> first [ emit-tuple ] cache-eql-object ; ! Arrays diff --git a/basis/compiler/cfg/instructions/syntax/syntax.factor b/basis/compiler/cfg/instructions/syntax/syntax.factor index 46517671b9..e52b8d5878 100644 --- a/basis/compiler/cfg/instructions/syntax/syntax.factor +++ b/basis/compiler/cfg/instructions/syntax/syntax.factor @@ -15,7 +15,7 @@ TUPLE: insn-slot-spec type name rep ; { { [ dup not ] [ ] } { [ dup "scalar-rep" = ] [ drop scalar-rep ] } - [ "cpu.architecture" lookup ] + [ "cpu.architecture" lookup-word ] } cond ; : parse-insn-slot-spec ( type string -- spec ) @@ -48,19 +48,19 @@ TUPLE: insn-slot-spec type name rep ; ! We cannot reference words in compiler.cfg.instructions directly ! since that would create circularity. : insn-classes-word ( -- word ) - "insn-classes" "compiler.cfg.instructions" lookup ; + "insn-classes" "compiler.cfg.instructions" lookup-word ; : insn-word ( -- word ) - "insn" "compiler.cfg.instructions" lookup ; + "insn" "compiler.cfg.instructions" lookup-word ; : vreg-insn-word ( -- word ) - "vreg-insn" "compiler.cfg.instructions" lookup ; + "vreg-insn" "compiler.cfg.instructions" lookup-word ; : flushable-insn-word ( -- word ) - "flushable-insn" "compiler.cfg.instructions" lookup ; + "flushable-insn" "compiler.cfg.instructions" lookup-word ; : foldable-insn-word ( -- word ) - "foldable-insn" "compiler.cfg.instructions" lookup ; + "foldable-insn" "compiler.cfg.instructions" lookup-word ; : insn-effect ( word -- effect ) boa-effect in>> but-last { } ; diff --git a/basis/compiler/tests/folding.factor b/basis/compiler/tests/folding.factor index ebdee36b70..1cf62fce81 100644 --- a/basis/compiler/tests/folding.factor +++ b/basis/compiler/tests/folding.factor @@ -22,7 +22,7 @@ IN: compiler.tests.folding ] unit-test [ t ] [ - "fold-test" "compiler.tests.folding" lookup execute - "fold-test" "compiler.tests.folding" lookup execute + "fold-test" "compiler.tests.folding" lookup-word execute + "fold-test" "compiler.tests.folding" lookup-word execute eq? ] unit-test diff --git a/basis/compiler/tests/redefine11.factor b/basis/compiler/tests/redefine11.factor index 0f16a42cc3..c70ae5cb06 100644 --- a/basis/compiler/tests/redefine11.factor +++ b/basis/compiler/tests/redefine11.factor @@ -21,11 +21,11 @@ IN: compiler.tests.redefine11 [ ] [ [ - array "my-mixin" "compiler.tests.redefine11" lookup + array "my-mixin" "compiler.tests.redefine11" lookup-word remove-mixin-instance ] with-compilation-unit ] unit-test [ 1 ] [ - "my-inline" "compiler.tests.redefine11" lookup execute + "my-inline" "compiler.tests.redefine11" lookup-word execute ] unit-test diff --git a/basis/compiler/tests/redefine16.factor b/basis/compiler/tests/redefine16.factor index ac879a7c75..9bf1de3e32 100644 --- a/basis/compiler/tests/redefine16.factor +++ b/basis/compiler/tests/redefine16.factor @@ -2,10 +2,10 @@ USING: eval tools.test definitions words compiler.units quotations stack-checker ; IN: compiler.tests.redefine16 -[ ] [ [ "blah" "compiler.tests.redefine16" lookup forget ] with-compilation-unit ] unit-test +[ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test [ ] [ "IN: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- )" eval( -- ) ] unit-test [ ] [ "IN: compiler.tests.redefine16 USING: strings math arrays prettyprint ; M: string blah 1 + 3array . ;" eval( -- ) ] unit-test [ ] [ "IN: compiler.tests.redefine16 GENERIC# blah 2 ( foo bar baz -- x )" eval( -- ) ] unit-test -[ ] [ [ "blah" "compiler.tests.redefine16" lookup forget ] with-compilation-unit ] unit-test +[ ] [ [ "blah" "compiler.tests.redefine16" lookup-word forget ] with-compilation-unit ] unit-test diff --git a/basis/compiler/tests/redefine18.factor b/basis/compiler/tests/redefine18.factor index efa9c6ce87..7259fb1af9 100644 --- a/basis/compiler/tests/redefine18.factor +++ b/basis/compiler/tests/redefine18.factor @@ -20,6 +20,6 @@ M: d g2 drop d ; [ ] [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d" eval( -- ) ] unit-test -[ d ] [ "b" "compiler.tests.redefine18" lookup g1 ] unit-test +[ d ] [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test [ ] [ "IN: compiler.tests.redefine18 FORGET: b" eval( -- ) ] unit-test diff --git a/basis/compiler/tests/redefine5.factor b/basis/compiler/tests/redefine5.factor index 38623393e7..b027230a48 100644 --- a/basis/compiler/tests/redefine5.factor +++ b/basis/compiler/tests/redefine5.factor @@ -23,6 +23,6 @@ IN: compiler.tests.redefine5 ] unit-test [ 0 ] [ - "my-tuple" "compiler.tests.redefine5" lookup boa - "my-inline" "compiler.tests.redefine5" lookup execute + "my-tuple" "compiler.tests.redefine5" lookup-word boa + "my-inline" "compiler.tests.redefine5" lookup-word execute ] unit-test diff --git a/basis/compiler/tests/redefine6.factor b/basis/compiler/tests/redefine6.factor index 892c768bc5..31ce19ceba 100644 --- a/basis/compiler/tests/redefine6.factor +++ b/basis/compiler/tests/redefine6.factor @@ -26,6 +26,6 @@ IN: compiler.tests.redefine6 ] unit-test [ 1 ] [ - "my-tuple" "compiler.tests.redefine6" lookup boa - "my-inline" "compiler.tests.redefine6" lookup execute + "my-tuple" "compiler.tests.redefine6" lookup-word boa + "my-inline" "compiler.tests.redefine6" lookup-word execute ] unit-test diff --git a/basis/compiler/tests/redefine7.factor b/basis/compiler/tests/redefine7.factor index 8e7abcb372..c74921361c 100644 --- a/basis/compiler/tests/redefine7.factor +++ b/basis/compiler/tests/redefine7.factor @@ -23,5 +23,5 @@ IN: compiler.tests.redefine7 ] unit-test [ 2.0 ] [ - 1.0 "my-inline" "compiler.tests.redefine7" lookup execute + 1.0 "my-inline" "compiler.tests.redefine7" lookup-word execute ] unit-test diff --git a/basis/compiler/tests/redefine8.factor b/basis/compiler/tests/redefine8.factor index b4deeb3cc1..4e9424978a 100644 --- a/basis/compiler/tests/redefine8.factor +++ b/basis/compiler/tests/redefine8.factor @@ -26,5 +26,5 @@ IN: compiler.tests.redefine8 ] unit-test [ 2.0 ] [ - 1.0 "my-generic" "compiler.tests.redefine8" lookup execute + 1.0 "my-generic" "compiler.tests.redefine8" lookup-word execute ] unit-test diff --git a/basis/compiler/tests/redefine9.factor b/basis/compiler/tests/redefine9.factor index abc677dd77..e76f5edf2e 100644 --- a/basis/compiler/tests/redefine9.factor +++ b/basis/compiler/tests/redefine9.factor @@ -27,7 +27,7 @@ IN: compiler.tests.redefine9 ] unit-test [ - "my-tuple" "compiler.tests.redefine9" lookup boa - "my-generic" "compiler.tests.redefine9" lookup + "my-tuple" "compiler.tests.redefine9" lookup-word boa + "my-generic" "compiler.tests.redefine9" lookup-word execute ] [ no-math-method? ] must-fail-with diff --git a/basis/functors/functors-tests.factor b/basis/functors/functors-tests.factor index aaa349262f..db06317ae7 100644 --- a/basis/functors/functors-tests.factor +++ b/basis/functors/functors-tests.factor @@ -115,14 +115,14 @@ M: integer W 1 + ; ] unit-test : test-redefinition ( -- ) - [ t ] [ "some-word" "functors.tests" lookup >boolean ] unit-test - [ t ] [ "some-tuple" "functors.tests" lookup >boolean ] unit-test - [ t ] [ "some-generic" "functors.tests" lookup >boolean ] unit-test + [ t ] [ "some-word" "functors.tests" lookup-word >boolean ] unit-test + [ t ] [ "some-tuple" "functors.tests" lookup-word >boolean ] unit-test + [ t ] [ "some-generic" "functors.tests" lookup-word >boolean ] unit-test [ t ] [ - "some-tuple" "functors.tests" lookup - "some-generic" "functors.tests" lookup lookup-method >boolean + "some-tuple" "functors.tests" lookup-word + "some-generic" "functors.tests" lookup-word lookup-method >boolean ] unit-test ; - [ t ] [ "some-symbol" "functors.tests" lookup >boolean ] unit-test + [ t ] [ "some-symbol" "functors.tests" lookup-word >boolean ] unit-test test-redefinition diff --git a/basis/furnace/utilities/utilities.factor b/basis/furnace/utilities/utilities.factor index 9ba34dcddc..5d35d6f94a 100644 --- a/basis/furnace/utilities/utilities.factor +++ b/basis/furnace/utilities/utilities.factor @@ -15,7 +15,7 @@ IN: furnace.utilities ERROR: no-such-word name vocab ; : string>word ( string -- word ) - ":" split1 swap 2dup lookup dup + ":" split1 swap 2dup lookup-word dup [ 2nip ] [ drop no-such-word ] if ; : strings>words ( seq -- seq' ) diff --git a/basis/help/crossref/crossref-tests.factor b/basis/help/crossref/crossref-tests.factor index 99f40622ea..4ed3f72140 100644 --- a/basis/help/crossref/crossref-tests.factor +++ b/basis/help/crossref/crossref-tests.factor @@ -14,13 +14,13 @@ IN: help.crossref.tests [ t ] [ "foo" article-children - "foo" "help.crossref.tests" lookup >link 1array sequence= + "foo" "help.crossref.tests" lookup-word >link 1array sequence= ] unit-test -[ "foo" ] [ "foo" "help.crossref.tests" lookup article-parent ] unit-test +[ "foo" ] [ "foo" "help.crossref.tests" lookup-word article-parent ] unit-test [ ] [ - [ "foo" "help.crossref.tests" lookup forget ] with-compilation-unit + [ "foo" "help.crossref.tests" lookup-word forget ] with-compilation-unit ] unit-test [ ] [ diff --git a/basis/help/definitions/definitions-tests.factor b/basis/help/definitions/definitions-tests.factor index c3365fe53f..4f916cfe82 100644 --- a/basis/help/definitions/definitions-tests.factor +++ b/basis/help/definitions/definitions-tests.factor @@ -16,7 +16,7 @@ IN: help.definitions.tests [ t ] [ "hello" articles get key? ] unit-test [ t ] [ "hello2" articles get key? ] unit-test [ t ] [ - "hello" "help.definitions.tests" lookup "help" word-prop >boolean + "hello" "help.definitions.tests" lookup-word "help" word-prop >boolean ] unit-test [ 2 ] [ @@ -29,12 +29,12 @@ IN: help.definitions.tests [ t ] [ "hello" articles get key? ] unit-test [ f ] [ "hello2" articles get key? ] unit-test [ f ] [ - "hello" "help.definitions.tests" lookup "help" word-prop + "hello" "help.definitions.tests" lookup-word "help" word-prop ] unit-test [ ] [ "IN: help.definitions.tests USING: help.syntax ; : xxx ( -- ) ; HELP: xxx ;" eval( -- ) ] unit-test - [ ] [ "xxx" "help.definitions.tests" lookup print-topic ] unit-test + [ ] [ "xxx" "help.definitions.tests" lookup-word print-topic ] unit-test - [ ] [ "xxx" "help.definitions.tests" lookup >link synopsis print ] unit-test + [ ] [ "xxx" "help.definitions.tests" lookup-word >link synopsis print ] unit-test ] with-file-vocabs diff --git a/basis/html/templates/chloe/chloe.factor b/basis/html/templates/chloe/chloe.factor index f42a5c3bde..19839de5a3 100644 --- a/basis/html/templates/chloe/chloe.factor +++ b/basis/html/templates/chloe/chloe.factor @@ -70,7 +70,7 @@ CHLOE: validation-errors drop [ render-validation-errors ] [code] ; : attr>word ( value -- word/f ) - ":" split1 swap lookup ; + ":" split1 swap lookup-word ; : if>quot ( tag -- quot ) [ diff --git a/basis/math/vectors/simd/simd-tests.factor b/basis/math/vectors/simd/simd-tests.factor index 79c9047a0e..f7c38058fb 100644 --- a/basis/math/vectors/simd/simd-tests.factor +++ b/basis/math/vectors/simd/simd-tests.factor @@ -119,10 +119,10 @@ CONSTANT: vector-words : vector-word-inputs ( schema -- seq ) { -> } split first ; : with-ctors ( -- seq ) - simd-classes [ [ name>> "-with" append ] [ vocabulary>> ] bi lookup ] map ; + simd-classes [ [ name>> "-with" append ] [ vocabulary>> ] bi lookup-word ] map ; : boa-ctors ( -- seq ) - simd-classes [ [ name>> "-boa" append ] [ vocabulary>> ] bi lookup ] map ; + simd-classes [ [ name>> "-boa" append ] [ vocabulary>> ] bi lookup-word ] map ; : check-optimizer ( seq test-quot eq-quot -- failures ) #! Use test-quot to generate a bunch of test cases from the diff --git a/basis/prettyprint/prettyprint-tests.factor b/basis/prettyprint/prettyprint-tests.factor index 42a7322037..a9e39db8bb 100644 --- a/basis/prettyprint/prettyprint-tests.factor +++ b/basis/prettyprint/prettyprint-tests.factor @@ -103,7 +103,7 @@ unit-test [ [ parse-fresh drop ] with-compilation-unit [ - "prettyprint.tests" lookup see + "prettyprint.tests" lookup-word see ] with-string-writer "\n" split but-last ] keep = ] with-interactive-vocabs ; @@ -261,7 +261,7 @@ M: class-see-layout class-see-layout ; [ t ] [ "IN: prettyprint.tests\nGENERIC: generic-decl-test ( a -- b ) flushable\n" dup eval( -- ) - "generic-decl-test" "prettyprint.tests" lookup + "generic-decl-test" "prettyprint.tests" lookup-word [ see ] with-string-writer = ] unit-test diff --git a/basis/serialize/serialize.factor b/basis/serialize/serialize.factor index 3cb37146c1..86d5ca8676 100644 --- a/basis/serialize/serialize.factor +++ b/basis/serialize/serialize.factor @@ -194,7 +194,7 @@ SYMBOL: deserialized (deserialize-string) dup intern-object ; : deserialize-word ( -- word ) - (deserialize) (deserialize) 2dup [ require ] keep lookup + (deserialize) (deserialize) 2dup [ require ] keep lookup-word dup [ 2nip ] [ drop 2array unparse "Unknown word: " prepend throw diff --git a/basis/specialized-arrays/specialized-arrays-tests.factor b/basis/specialized-arrays/specialized-arrays-tests.factor index 9164114725..48328a5c13 100644 --- a/basis/specialized-arrays/specialized-arrays-tests.factor +++ b/basis/specialized-arrays/specialized-arrays-tests.factor @@ -156,7 +156,7 @@ SPECIALIZED-ARRAY: __does_not_exist__ [ f ] [ "__does_not_exist__-array{" - __does_not_exist__ specialized-array-vocab lookup + __does_not_exist__ specialized-array-vocab lookup-word deferred? ] unit-test diff --git a/basis/specialized-arrays/specialized-arrays.factor b/basis/specialized-arrays/specialized-arrays.factor index 314989fd0a..bdf347f725 100644 --- a/basis/specialized-arrays/specialized-arrays.factor +++ b/basis/specialized-arrays/specialized-arrays.factor @@ -140,35 +140,35 @@ ERROR: specialized-array-vocab-not-loaded c-type ; M: c-type-word c-array-constructor underlying-type - dup [ name>> "<" "-array>" surround ] [ specialized-array-vocab ] bi lookup + dup [ name>> "<" "-array>" surround ] [ specialized-array-vocab ] bi lookup-word [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable M: pointer c-array-constructor drop void* c-array-constructor ; M: c-type-word c-(array)-constructor underlying-type - dup [ name>> "(" "-array)" surround ] [ specialized-array-vocab ] bi lookup + dup [ name>> "(" "-array)" surround ] [ specialized-array-vocab ] bi lookup-word [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable M: pointer c-(array)-constructor drop void* c-(array)-constructor ; M: c-type-word c-direct-array-constructor underlying-type - dup [ name>> "" surround ] [ specialized-array-vocab ] bi lookup + dup [ name>> "" surround ] [ specialized-array-vocab ] bi lookup-word [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable M: pointer c-direct-array-constructor drop void* c-direct-array-constructor ; M: c-type-word c-array-type underlying-type - dup [ name>> "-array" append ] [ specialized-array-vocab ] bi lookup + dup [ name>> "-array" append ] [ specialized-array-vocab ] bi lookup-word [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable M: pointer c-array-type drop void* c-array-type ; M: c-type-word c-array-type? underlying-type - dup [ name>> "-array?" append ] [ specialized-array-vocab ] bi lookup + dup [ name>> "-array?" append ] [ specialized-array-vocab ] bi lookup-word [ ] [ specialized-array-vocab-not-loaded ] ?if ; foldable M: pointer c-array-type? drop void* c-array-type? ; diff --git a/basis/tools/deploy/shaker/shaker.factor b/basis/tools/deploy/shaker/shaker.factor index 05234e544b..be759da524 100755 --- a/basis/tools/deploy/shaker/shaker.factor +++ b/basis/tools/deploy/shaker/shaker.factor @@ -299,11 +299,11 @@ IN: tools.deploy.shaker : strip-vocab-globals ( except names -- words ) [ child-vocabs [ words ] map concat ] map concat - swap [ first2 lookup ] map sift diff ; + swap [ first2 lookup-word ] map sift diff ; : stripped-globals ( -- seq ) [ - "inspector-hook" "inspector" lookup , + "inspector-hook" "inspector" lookup-word , { continuations:error @@ -320,14 +320,14 @@ IN: tools.deploy.shaker current-directory } % - "io-thread" "io.thread" lookup , + "io-thread" "io.thread" lookup-word , - "disposables" "destructors" lookup , + "disposables" "destructors" lookup-word , - "functor-words" "functors.backend" lookup , + "functor-words" "functors.backend" lookup-word , deploy-threads? [ - "initial-thread" "threads" lookup , + "initial-thread" "threads" lookup-word , ] unless strip-io? [ io-backend , ] when @@ -343,7 +343,7 @@ IN: tools.deploy.shaker } strip-vocab-globals % strip-dictionary? [ - "libraries" "alien" lookup , + "libraries" "alien" lookup-word , { { "yield-hook" "compiler.utilities" } } { "cpu" "compiler" } strip-vocab-globals % @@ -395,7 +395,7 @@ IN: tools.deploy.shaker \ compiler.errors:compiler-errors , ] when - "windows-messages" "windows.messages" lookup [ , ] when* + "windows-messages" "windows.messages" lookup-word [ , ] when* ] { } make ; : strip-globals ( stripped-globals -- ) @@ -451,9 +451,9 @@ IN: tools.deploy.shaker SYMBOL: deploy-vocab -: [:c] ( -- word ) ":c" "debugger" lookup ; +: [:c] ( -- word ) ":c" "debugger" lookup-word ; -: [print-error] ( -- word ) "print-error" "debugger" lookup ; +: [print-error] ( -- word ) "print-error" "debugger" lookup-word ; : deploy-startup-quot ( word -- ) [ @@ -532,9 +532,9 @@ SYMBOL: deploy-vocab ] each [ - "deploy-libraries" "alien.libraries" lookup forget - "deploy-library" "alien.libraries" lookup forget - ">deployed-library-path" "alien.libraries.private" lookup forget + "deploy-libraries" "alien.libraries" lookup-word forget + "deploy-library" "alien.libraries" lookup-word forget + ">deployed-library-path" "alien.libraries.private" lookup-word forget ] with-compilation-unit ; : strip ( vocab-manifest-out -- ) diff --git a/basis/vocabs/metadata/metadata.factor b/basis/vocabs/metadata/metadata.factor index bb14581f0d..9b144fd317 100644 --- a/basis/vocabs/metadata/metadata.factor +++ b/basis/vocabs/metadata/metadata.factor @@ -94,7 +94,7 @@ ERROR: bad-platform name ; : vocab-platforms ( vocab -- platforms ) dup vocab-platforms-path vocab-file-contents - [ dup "system" lookup [ ] [ bad-platform ] ?if ] map ; + [ dup "system" lookup-word [ ] [ bad-platform ] ?if ] map ; : set-vocab-platforms ( platforms vocab -- ) [ [ name>> ] map ] dip diff --git a/core/bootstrap/primitives.factor b/core/bootstrap/primitives.factor index 20a5a493cd..594120fdd6 100755 --- a/core/bootstrap/primitives.factor +++ b/core/bootstrap/primitives.factor @@ -140,7 +140,7 @@ call( -- ) "bignum" "math" create register-builtin "tuple" "kernel" create register-builtin "float" "math" create register-builtin -"f" "syntax" lookup register-builtin +"f" "syntax" lookup-word register-builtin "array" "arrays" create register-builtin "wrapper" "kernel" create register-builtin "callstack" "kernel" create register-builtin @@ -152,23 +152,23 @@ call( -- ) "byte-array" "byte-arrays" create register-builtin ! We need this before defining c-ptr below -"f" "syntax" lookup { } define-builtin +"f" "syntax" lookup-word { } define-builtin "f" "syntax" create [ not ] "predicate" set-word-prop "f?" "syntax" vocab-words delete-at -"t" "syntax" lookup define-singleton-class +"t" "syntax" lookup-word define-singleton-class ! Some unions "c-ptr" "alien" create [ - "alien" "alien" lookup , - "f" "syntax" lookup , - "byte-array" "byte-arrays" lookup , + "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 -"fixnum" "math" lookup +"fixnum" "math" lookup-word [ [ dup 0 fixnum>= ] % bootstrap-max-array-capacity [ fixnum<= ] curry , @@ -176,7 +176,7 @@ call( -- ) ] [ ] make define-predicate-class -"array-capacity" "sequences.private" lookup +"array-capacity" "sequences.private" lookup-word [ >fixnum ] bootstrap-max-array-capacity [ fixnum-bitand ] curry append "coercer" set-word-prop @@ -262,11 +262,11 @@ tuple { "state" } define-tuple-class "((empty))" "hashtables.private" create -"tombstone" "hashtables.private" lookup f +"tombstone" "hashtables.private" lookup-word f 2array >tuple 1quotation ( -- value ) define-inline "((tombstone))" "hashtables.private" create -"tombstone" "hashtables.private" lookup t +"tombstone" "hashtables.private" lookup-word t 2array >tuple 1quotation ( -- value ) define-inline ! Some tuple classes @@ -277,7 +277,7 @@ tuple { "quot" read-only } } prepare-slots define-tuple-class -"curry" "kernel" lookup +"curry" "kernel" lookup-word { [ f "inline" set-word-prop ] [ make-flushable ] @@ -299,7 +299,7 @@ tuple { "second" read-only } } prepare-slots define-tuple-class -"compose" "kernel" lookup +"compose" "kernel" lookup-word { [ f "inline" set-word-prop ] [ make-flushable ] diff --git a/core/bootstrap/syntax.factor b/core/bootstrap/syntax.factor index 9395447aa6..a0ed21808f 100644 --- a/core/bootstrap/syntax.factor +++ b/core/bootstrap/syntax.factor @@ -97,5 +97,5 @@ IN: bootstrap.syntax ">>>>>>>" } [ "syntax" create drop ] each - "t" "syntax" lookup define-symbol + "t" "syntax" lookup-word define-symbol ] with-compilation-unit diff --git a/core/classes/mixin/mixin-tests.factor b/core/classes/mixin/mixin-tests.factor index 0569149392..ad5d0c7b0c 100644 --- a/core/classes/mixin/mixin-tests.factor +++ b/core/classes/mixin/mixin-tests.factor @@ -65,8 +65,8 @@ USE: io.streams.string parse-stream drop ] unit-test - [ { } ] [ { } "mixin-forget-test-g" "classes.mixin.tests" lookup execute ] unit-test - [ H{ } "mixin-forget-test-g" "classes.mixin.tests" lookup execute ] must-fail + [ { } ] [ { } "mixin-forget-test-g" "classes.mixin.tests" lookup-word execute ] unit-test + [ H{ } "mixin-forget-test-g" "classes.mixin.tests" lookup-word execute ] must-fail [ ] [ { @@ -80,8 +80,8 @@ USE: io.streams.string parse-stream drop ] unit-test - [ { } "mixin-forget-test-g" "classes.mixin.tests" lookup execute ] must-fail - [ H{ } ] [ H{ } "mixin-forget-test-g" "classes.mixin.tests" lookup execute ] unit-test + [ { } "mixin-forget-test-g" "classes.mixin.tests" lookup-word execute ] must-fail + [ H{ } ] [ H{ } "mixin-forget-test-g" "classes.mixin.tests" lookup-word execute ] unit-test ] times ! Method flattening interfered with mixin update @@ -99,11 +99,11 @@ TUPLE: flat-mx-2-1 ; INSTANCE: flat-mx-2-1 flat-mx-2 [ ] [ "IN: classes.mixin.tests MIXIN: blah SINGLETON: boo INSTANCE: boo blah" "mixin-reset-test" parse-stream drop ] unit-test -[ t ] [ "blah" "classes.mixin.tests" lookup mixin-class? ] unit-test +[ t ] [ "blah" "classes.mixin.tests" lookup-word mixin-class? ] unit-test [ ] [ "IN: classes.mixin.tests MIXIN: blah" "mixin-reset-test" parse-stream drop ] unit-test -[ t ] [ "blah" "classes.mixin.tests" lookup mixin-class? ] unit-test +[ t ] [ "blah" "classes.mixin.tests" lookup-word mixin-class? ] unit-test MIXIN: empty-mixin diff --git a/core/classes/tuple/tuple-tests.factor b/core/classes/tuple/tuple-tests.factor index 481d693925..2bec1e3f83 100644 --- a/core/classes/tuple/tuple-tests.factor +++ b/core/classes/tuple/tuple-tests.factor @@ -42,13 +42,13 @@ TUPLE: point x y ; [ 100 ] [ "p" get x>> ] unit-test [ 200 ] [ "p" get y>> ] unit-test -[ f ] [ "p" get "z>>" "accessors" lookup execute ] unit-test +[ f ] [ "p" get "z>>" "accessors" lookup-word execute ] unit-test -[ ] [ "p" get 300 ">>z" "accessors" lookup execute drop ] unit-test +[ ] [ "p" get 300 ">>z" "accessors" lookup-word execute drop ] unit-test [ 3 ] [ "p" get tuple-size ] unit-test -[ 300 ] [ "p" get "z>>" "accessors" lookup execute ] unit-test +[ 300 ] [ "p" get "z>>" "accessors" lookup-word execute ] unit-test [ ] [ "IN: classes.tuple.tests TUPLE: point z y ;" eval( -- ) ] unit-test @@ -56,7 +56,7 @@ TUPLE: point x y ; [ "p" get x>> ] must-fail [ 200 ] [ "p" get y>> ] unit-test -[ 300 ] [ "p" get "z>>" "accessors" lookup execute ] unit-test +[ 300 ] [ "p" get "z>>" "accessors" lookup-word execute ] unit-test TUPLE: predicate-test ; @@ -472,11 +472,11 @@ must-fail-with "forget-accessors-test" parse-stream ] unit-test -[ t ] [ "forget-accessors-test" "classes.tuple.tests" lookup class? ] unit-test +[ t ] [ "forget-accessors-test" "classes.tuple.tests" lookup-word class? ] unit-test : accessor-exists? ( name -- ? ) - [ "forget-accessors-test" "classes.tuple.tests" lookup ] dip - ">>" append "accessors" lookup ?lookup-method >boolean ; + [ "forget-accessors-test" "classes.tuple.tests" lookup-word ] dip + ">>" append "accessors" lookup-word ?lookup-method >boolean ; [ t ] [ "x" accessor-exists? ] unit-test [ t ] [ "y" accessor-exists? ] unit-test @@ -488,7 +488,7 @@ must-fail-with "forget-accessors-test" parse-stream ] unit-test -[ f ] [ "forget-accessors-test" "classes.tuple.tests" lookup class? ] unit-test +[ f ] [ "forget-accessors-test" "classes.tuple.tests" lookup-word class? ] unit-test [ f ] [ "x" accessor-exists? ] unit-test [ f ] [ "y" accessor-exists? ] unit-test @@ -649,7 +649,7 @@ DEFER: error-y drop ] unit-test -[ ] [ "forget-subclass-test'" "classes.tuple.tests" lookup new "bad-object" set ] unit-test +[ ] [ "forget-subclass-test'" "classes.tuple.tests" lookup-word new "bad-object" set ] unit-test [ ] [ "IN: classes.tuple.tests TUPLE: forget-subclass-test a ;" diff --git a/core/classes/union/union-tests.factor b/core/classes/union/union-tests.factor index 9bbb722258..2ba5836fe9 100644 --- a/core/classes/union/union-tests.factor +++ b/core/classes/union/union-tests.factor @@ -70,15 +70,15 @@ UNION: redefine-bug-2 redefine-bug-1 quotation ; [ ] [ "IN: classes.union.tests SINGLETON: foo UNION: blah foo ;" "union-reset-test" parse-stream drop ] unit-test -[ t ] [ "blah" "classes.union.tests" lookup union-class? ] unit-test +[ t ] [ "blah" "classes.union.tests" lookup-word union-class? ] unit-test -[ t ] [ "foo?" "classes.union.tests" lookup predicate? ] unit-test +[ t ] [ "foo?" "classes.union.tests" lookup-word predicate? ] unit-test [ ] [ "IN: classes.union.tests USE: math UNION: blah integer ;" "union-reset-test" parse-stream drop ] unit-test -[ t ] [ "blah" "classes.union.tests" lookup union-class? ] unit-test +[ t ] [ "blah" "classes.union.tests" lookup-word union-class? ] unit-test -[ f ] [ "foo?" "classes.union.tests" lookup predicate? ] unit-test +[ f ] [ "foo?" "classes.union.tests" lookup-word predicate? ] unit-test GENERIC: test-generic ( x -- y ) @@ -102,8 +102,8 @@ M: a-union test-generic ; [ ] [ "IN: classes.union.tests USE: math UNION: fast-union-1 fixnum ; UNION: fast-union-2 fast-union-1 bignum ;" eval( -- ) ] unit-test -[ t ] [ "fast-union-2?" "classes.union.tests" lookup def>> \ fixnum-bitand swap member? ] unit-test +[ t ] [ "fast-union-2?" "classes.union.tests" lookup-word def>> \ fixnum-bitand swap member? ] unit-test [ ] [ "IN: classes.union.tests USE: vectors UNION: fast-union-1 vector ;" eval( -- ) ] unit-test -[ f ] [ "fast-union-2?" "classes.union.tests" lookup def>> \ fixnum-bitand swap member? ] unit-test +[ f ] [ "fast-union-2?" "classes.union.tests" lookup-word def>> \ fixnum-bitand swap member? ] unit-test diff --git a/core/generic/standard/standard-tests.factor b/core/generic/standard/standard-tests.factor index a5e7b830b2..1a464e16d3 100644 --- a/core/generic/standard/standard-tests.factor +++ b/core/generic/standard/standard-tests.factor @@ -364,8 +364,8 @@ M: c funky* "c" , call-next-method ; [ ] [ "IN: generic.standard.tests GENERIC: xyz ( a -- b )" eval( -- ) ] unit-test [ ] [ "IN: generic.standard.tests MATH: xyz ( a b -- c )" eval( -- ) ] unit-test -[ f ] [ "xyz" "generic.standard.tests" lookup pic-def>> ] unit-test -[ f ] [ "xyz" "generic.standard.tests" lookup "decision-tree" word-prop ] unit-test +[ f ] [ "xyz" "generic.standard.tests" lookup-word pic-def>> ] unit-test +[ f ] [ "xyz" "generic.standard.tests" lookup-word "decision-tree" word-prop ] unit-test ! Corner case [ "IN: generic.standard.tests GENERIC# broken-generic# -1 ( a -- b )" eval( -- ) ] diff --git a/core/io/io-tests.factor b/core/io/io-tests.factor index 0842d0c000..da32cd00e3 100644 --- a/core/io/io-tests.factor +++ b/core/io/io-tests.factor @@ -4,7 +4,7 @@ IN: io.tests { f } [ "vocab:io/test/no-trailing-eol.factor" run-file - "foo" "io.tests" lookup + "foo" "io.tests" lookup-word ] unit-test ! Make sure we use correct to_c_string form when writing @@ -93,4 +93,4 @@ M: dumb-writer stream-write1 vector>> push ; inline [ "asdf" output-stream get stream-write ] with-output>error ] with-error-stream ] keep >string -] unit-test \ No newline at end of file +] unit-test diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index b5530e32b6..560930c5ec 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -53,7 +53,7 @@ unit-test : effect-parsing-test ( a b -- c ) + ; [ t ] [ - "effect-parsing-test" "parser.tests" lookup + "effect-parsing-test" "parser.tests" lookup-word \ effect-parsing-test eq? ] unit-test @@ -69,7 +69,7 @@ unit-test [ ] [ "IN: parser.tests USE: math : effect-parsing-test ( a b -- d ) - ;" eval( -- ) ] unit-test [ t ] [ - "effect-parsing-test" "parser.tests" lookup + "effect-parsing-test" "parser.tests" lookup-word \ effect-parsing-test eq? ] unit-test @@ -96,7 +96,7 @@ DEFER: foo [ t ] [ "USE: parser.tests \\ foo" eval( -- word ) - "foo" "parser.tests" lookup eq? + "foo" "parser.tests" lookup-word eq? ] unit-test ! parse-tokens should do the right thing on EOF @@ -112,15 +112,15 @@ DEFER: foo "foo" source-file definitions>> first assoc-size ] unit-test -[ t ] [ "smudge-me" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "smudge-me" "parser.tests" lookup-word >boolean ] unit-test [ ] [ "IN: parser.tests : smudge-me-more ( -- ) ;" "foo" parse-stream drop ] unit-test -[ t ] [ "smudge-me-more" "parser.tests" lookup >boolean ] unit-test -[ f ] [ "smudge-me" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "smudge-me-more" "parser.tests" lookup-word >boolean ] unit-test +[ f ] [ "smudge-me" "parser.tests" lookup-word >boolean ] unit-test [ 3 ] [ "IN: parser.tests USING: math strings ; GENERIC: smudge-me ( a -- b ) M: integer smudge-me ; M: string smudge-me ;" "foo" @@ -144,15 +144,15 @@ DEFER: foo ] unit-test [ t ] [ - array "smudge-me" "parser.tests" lookup order member-eq? + array "smudge-me" "parser.tests" lookup-word order member-eq? ] unit-test [ t ] [ - integer "smudge-me" "parser.tests" lookup order member-eq? + integer "smudge-me" "parser.tests" lookup-word order member-eq? ] unit-test [ f ] [ - string "smudge-me" "parser.tests" lookup order member-eq? + string "smudge-me" "parser.tests" lookup-word order member-eq? ] unit-test [ ] [ @@ -189,14 +189,14 @@ DEFER: foo ] [ source-file-error? ] must-fail-with [ t ] [ - "y" "parser.tests" lookup >boolean + "y" "parser.tests" lookup-word >boolean ] unit-test [ f ] [ "IN: parser.tests : x ( -- ) ;" "a" parse-stream drop - "y" "parser.tests" lookup + "y" "parser.tests" lookup-word ] unit-test ! Test new forward definition logic @@ -216,7 +216,7 @@ DEFER: foo "axx" parse-stream drop ] unit-test -[ t ] [ "bxx" "axx" lookup >boolean ] unit-test +[ t ] [ "bxx" "axx" lookup-word >boolean ] unit-test ! And reload the file that uses it... [ ] [ @@ -280,7 +280,7 @@ DEFER: foo ] unit-test [ t ] [ - "killer?" "parser.tests" lookup >boolean + "killer?" "parser.tests" lookup-word >boolean ] unit-test [ @@ -341,7 +341,7 @@ DEFER: foo ] unit-test [ t ] [ - "foo" "parser.tests" lookup word eq? + "foo" "parser.tests" lookup-word word eq? ] unit-test [ ] [ @@ -363,28 +363,28 @@ DEFER: foo "redefining-a-class-6" parse-stream drop ] unit-test - [ f ] [ f "foo" "parser.tests" lookup execute ] unit-test + [ f ] [ f "foo" "parser.tests" lookup-word execute ] unit-test [ ] [ "IN: parser.tests TUPLE: foo ; GENERIC: foo ( a -- b )" "redefining-a-class-5" parse-stream drop ] unit-test - [ f ] [ f "foo" "parser.tests" lookup execute ] unit-test + [ f ] [ f "foo" "parser.tests" lookup-word execute ] unit-test [ ] [ "IN: parser.tests TUPLE: foo ; GENERIC: foo ( a -- b )" "redefining-a-class-7" parse-stream drop ] unit-test - [ f ] [ f "foo" "parser.tests" lookup execute ] unit-test + [ f ] [ f "foo" "parser.tests" lookup-word execute ] unit-test [ ] [ "IN: parser.tests TUPLE: foo ;" "redefining-a-class-7" parse-stream drop ] unit-test - [ t ] [ "foo" "parser.tests" lookup symbol? ] unit-test + [ t ] [ "foo" "parser.tests" lookup-word symbol? ] unit-test ] times [ "vocab:parser/test/assert-depth.factor" run-file ] must-fail @@ -440,7 +440,7 @@ DEFER: foo ] unit-test [ 2 ] [ - "change-combination" "parser.tests" lookup + "change-combination" "parser.tests" lookup-word "methods" word-prop assoc-size ] unit-test @@ -456,18 +456,18 @@ DEFER: foo "staging-problem-test" parse-stream ] unit-test -[ t ] [ "staging-problem-test-1" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "staging-problem-test-1" "parser.tests" lookup-word >boolean ] unit-test -[ t ] [ "staging-problem-test-2" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "staging-problem-test-2" "parser.tests" lookup-word >boolean ] unit-test [ [ ] ] [ "IN: parser.tests << : staging-problem-test-1 ( -- a ) 1 ; >> : staging-problem-test-2 ( -- a ) staging-problem-test-1 ;" "staging-problem-test" parse-stream ] unit-test -[ t ] [ "staging-problem-test-1" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "staging-problem-test-1" "parser.tests" lookup-word >boolean ] unit-test -[ t ] [ "staging-problem-test-2" "parser.tests" lookup >boolean ] unit-test +[ t ] [ "staging-problem-test-2" "parser.tests" lookup-word >boolean ] unit-test [ "DEFER: blahy" eval( -- ) ] [ error>> error>> no-current-vocab? ] must-fail-with @@ -540,14 +540,14 @@ EXCLUDE: qualified.tests.bar => x ; "was-once-a-word-test" parse-stream ] unit-test -[ t ] [ "was-once-a-word-bug" "parser.tests" lookup >boolean ] unit-test +[ 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 >>" "was-once-a-word-test" parse-stream ] unit-test -[ t ] [ "was-once-a-word-bug" "parser.tests" lookup >boolean ] unit-test */ +[ t ] [ "was-once-a-word-bug" "parser.tests" lookup-word >boolean ] unit-test */ ! Replace : def with DEFER: [ [ ] ] [ @@ -555,16 +555,16 @@ EXCLUDE: qualified.tests.bar => x ; "is-not-deferred" parse-stream ] unit-test -[ t ] [ "is-not-deferred" "parser.tests" lookup >boolean ] unit-test -[ f ] [ "is-not-deferred" "parser.tests" lookup deferred? ] unit-test +[ t ] [ "is-not-deferred" "parser.tests" lookup-word >boolean ] unit-test +[ f ] [ "is-not-deferred" "parser.tests" lookup-word deferred? ] unit-test [ [ ] ] [ "IN: parser.tests DEFER: is-not-deferred" "is-not-deferred" parse-stream ] unit-test -[ t ] [ "is-not-deferred" "parser.tests" lookup >boolean ] unit-test -[ t ] [ "is-not-deferred" "parser.tests" lookup deferred? ] unit-test +[ t ] [ "is-not-deferred" "parser.tests" lookup-word >boolean ] unit-test +[ t ] [ "is-not-deferred" "parser.tests" lookup-word deferred? ] unit-test ! Forward-reference resolution case iterated using list in the wrong direction [ [ ] ] [ @@ -583,7 +583,7 @@ EXCLUDE: qualified.tests.bar => x ; ] unit-test [ t ] [ - "z" "parser.tests.forward-ref-3" lookup def>> [ vocabulary>> ] map all-equal? + "z" "parser.tests.forward-ref-3" lookup-word def>> [ vocabulary>> ] map all-equal? ] unit-test [ [ ] ] [ @@ -592,7 +592,7 @@ EXCLUDE: qualified.tests.bar => x ; ] unit-test [ f ] [ - "z" "parser.tests.forward-ref-3" lookup def>> [ vocabulary>> ] map all-equal? + "z" "parser.tests.forward-ref-3" lookup-word def>> [ vocabulary>> ] map all-equal? ] unit-test [ [ ] ] [ @@ -601,7 +601,7 @@ EXCLUDE: qualified.tests.bar => x ; ] unit-test [ t ] [ - "z" "parser.tests.forward-ref-3" lookup def>> [ vocabulary>> ] map all-equal? + "z" "parser.tests.forward-ref-3" lookup-word def>> [ vocabulary>> ] map all-equal? ] unit-test [ [ dup ] ] [ diff --git a/core/syntax/syntax.factor b/core/syntax/syntax.factor index 803287a89d..6ed0a3330d 100644 --- a/core/syntax/syntax.factor +++ b/core/syntax/syntax.factor @@ -20,10 +20,10 @@ IN: bootstrap.syntax ! in stage2. : define-delimiter ( name -- ) - "syntax" lookup t "delimiter" set-word-prop ; + "syntax" lookup-word t "delimiter" set-word-prop ; : define-core-syntax ( name quot -- ) - [ dup "syntax" lookup [ ] [ no-word-error ] ?if ] dip + [ dup "syntax" lookup-word [ ] [ no-word-error ] ?if ] dip define-syntax ; [ @@ -249,9 +249,9 @@ IN: bootstrap.syntax ] if* ] define-core-syntax - "initial:" "syntax" lookup define-symbol + "initial:" "syntax" lookup-word define-symbol - "read-only" "syntax" lookup define-symbol + "read-only" "syntax" lookup-word define-symbol "call(" [ \ call-effect parse-call( ] define-core-syntax diff --git a/core/vocabs/loader/loader-tests.factor b/core/vocabs/loader/loader-tests.factor index 73eea11354..fd1f90de5b 100644 --- a/core/vocabs/loader/loader-tests.factor +++ b/core/vocabs/loader/loader-tests.factor @@ -47,7 +47,7 @@ IN: vocabs.loader.tests [ t ] [ "resource:core/vocabs/loader/test/a/a.factor" source-file definitions>> dup USE: prettyprint . - "v-l-t-a-hello" "vocabs.loader.test.a" lookup dup . + "v-l-t-a-hello" "vocabs.loader.test.a" lookup-word dup . swap first key? ] unit-test ] times @@ -92,7 +92,7 @@ IN: vocabs.loader.tests [ 2 ] [ "count-me" get-global ] unit-test -[ f ] [ "fred" "vocabs.loader.test.b" lookup undefined? ] unit-test +[ f ] [ "fred" "vocabs.loader.test.b" lookup-word undefined? ] unit-test [ ] [ [ diff --git a/core/vocabs/parser/parser-tests.factor b/core/vocabs/parser/parser-tests.factor index 21a5066c1d..038107fc4d 100644 --- a/core/vocabs/parser/parser-tests.factor +++ b/core/vocabs/parser/parser-tests.factor @@ -26,7 +26,7 @@ must-fail-with [ ] [ [ \ aaa forget ] with-compilation-unit ] unit-test - [ ] [ [ "bbb" "vocabs.parser.tests" lookup forget ] with-compilation-unit ] unit-test + [ ] [ [ "bbb" "vocabs.parser.tests" lookup-word forget ] with-compilation-unit ] unit-test [ f ] [ "uutt" search ] unit-test @@ -48,4 +48,4 @@ must-fail-with [ f ] [ "bbb" search >boolean ] unit-test -] with-manifest \ No newline at end of file +] with-manifest diff --git a/core/words/words-docs.factor b/core/words/words-docs.factor index 0cf0076d4f..5e313a859b 100644 --- a/core/words/words-docs.factor +++ b/core/words/words-docs.factor @@ -12,7 +12,7 @@ $nl { $subsections create create-in - lookup + lookup-word } ; ARTICLE: "uninterned-words" "Uninterned words" @@ -279,7 +279,7 @@ HELP: set-word { $values { "word" word } } { $description "Sets the recently defined word." } ; -HELP: lookup +HELP: lookup-word { $values { "name" string } { "vocab" string } { "word" { $maybe word } } } { $description "Looks up a word in the dictionary. If the vocabulary or the word is not defined, outputs " { $link f } "." } ; diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index 2a9ccf1d99..2b707bc3bf 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -8,7 +8,7 @@ IN: words.tests [ "poo" "words.tests" create [ 2 2 + ] ( -- n ) define-declared ] with-compilation-unit - "poo" "words.tests" lookup execute + "poo" "words.tests" lookup-word execute ] unit-test [ t ] [ t vocabs [ words [ word? and ] each ] each ] unit-test @@ -28,17 +28,17 @@ DEFER: plist-test [ ] [ [ "create-test" "scratchpad" create { 1 2 } "testing" set-word-prop ] with-compilation-unit ] unit-test [ { 1 2 } ] [ - "create-test" "scratchpad" lookup "testing" word-prop + "create-test" "scratchpad" lookup-word "testing" word-prop ] unit-test [ - [ t ] [ \ array? "array?" "arrays" lookup = ] unit-test + [ t ] [ \ array? "array?" "arrays" lookup-word = ] unit-test [ ] [ [ "test-scope" "scratchpad" create drop ] with-compilation-unit ] unit-test ] with-scope [ "test-scope" ] [ - "test-scope" "scratchpad" lookup name>> + "test-scope" "scratchpad" lookup-word name>> ] unit-test [ t ] [ vocabs array? ] unit-test @@ -74,15 +74,15 @@ DEFER: deferred [ ] [ "IN: words.tests FORGET: not-compiled" eval( -- ) ] unit-test [ ] [ [ "no-loc" "words.tests" create drop ] with-compilation-unit ] unit-test -[ f ] [ "no-loc" "words.tests" lookup where ] unit-test +[ f ] [ "no-loc" "words.tests" lookup-word where ] unit-test [ ] [ "IN: words.tests : no-loc-2 ( -- ) ;" eval( -- ) ] unit-test -[ f ] [ "no-loc-2" "words.tests" lookup where ] unit-test +[ f ] [ "no-loc-2" "words.tests" lookup-word where ] unit-test [ ] [ "IN: words.tests : test-last ( -- ) ;" eval( -- ) ] unit-test [ "test-last" ] [ word name>> ] unit-test -"undef-test" "words.tests" lookup [ +"undef-test" "words.tests" lookup-word [ [ forget ] with-compilation-unit ] when* @@ -97,8 +97,8 @@ DEFER: deferred "IN: words.tests SYMBOL: symbol-generic" eval( -- ) ] unit-test -[ t ] [ "symbol-generic" "words.tests" lookup symbol? ] unit-test -[ f ] [ "symbol-generic" "words.tests" lookup generic? ] unit-test +[ t ] [ "symbol-generic" "words.tests" lookup-word symbol? ] unit-test +[ f ] [ "symbol-generic" "words.tests" lookup-word generic? ] unit-test [ ] [ "IN: words.tests GENERIC: symbol-generic ( a -- b )" @@ -110,19 +110,19 @@ DEFER: deferred "symbol-generic-test" parse-stream drop ] unit-test -[ t ] [ "symbol-generic" "words.tests" lookup symbol? ] unit-test -[ f ] [ "symbol-generic" "words.tests" lookup generic? ] unit-test +[ t ] [ "symbol-generic" "words.tests" lookup-word symbol? ] unit-test +[ f ] [ "symbol-generic" "words.tests" lookup-word generic? ] unit-test ! Regressions [ ] [ "IN: words.tests : decl-forget-test ( -- ) ; foldable" eval( -- ) ] unit-test -[ t ] [ "decl-forget-test" "words.tests" lookup "foldable" word-prop ] unit-test +[ t ] [ "decl-forget-test" "words.tests" lookup-word "foldable" word-prop ] unit-test [ ] [ "IN: words.tests : decl-forget-test ( -- ) ;" eval( -- ) ] unit-test -[ f ] [ "decl-forget-test" "words.tests" lookup "foldable" word-prop ] unit-test +[ f ] [ "decl-forget-test" "words.tests" lookup-word "foldable" word-prop ] unit-test [ ] [ "IN: words.tests : decl-forget-test ( -- ) ; flushable" eval( -- ) ] unit-test -[ t ] [ "decl-forget-test" "words.tests" lookup "flushable" word-prop ] unit-test +[ t ] [ "decl-forget-test" "words.tests" lookup-word "flushable" word-prop ] unit-test [ ] [ "IN: words.tests : decl-forget-test ( -- ) ;" eval( -- ) ] unit-test -[ f ] [ "decl-forget-test" "words.tests" lookup "flushable" word-prop ] unit-test +[ f ] [ "decl-forget-test" "words.tests" lookup-word "flushable" word-prop ] unit-test [ { } ] [ diff --git a/core/words/words.factor b/core/words/words.factor index cef5c1afc3..47a7531b34 100644 --- a/core/words/words.factor +++ b/core/words/words.factor @@ -59,10 +59,10 @@ PREDICATE: primitive < word "primitive" word-prop ; M: primitive definer drop \ PRIMITIVE: f ; M: primitive definition drop f ; -: lookup ( name vocab -- word ) vocab-words at ; +: lookup-word ( name vocab -- word ) vocab-words at ; : target-word ( word -- target ) - [ name>> ] [ vocabulary>> ] bi lookup ; + [ name>> ] [ vocabulary>> ] bi lookup-word ; SYMBOL: bootstrapping? @@ -193,7 +193,7 @@ ERROR: bad-create name vocab ; [ bad-create ] unless ; : create ( name vocab -- word ) - check-create 2dup lookup + check-create 2dup lookup-word dup [ 2nip ] [ drop vocab-name diff --git a/extra/annotations/annotations-docs.factor b/extra/annotations/annotations-docs.factor index 292f181f84..0d37672fe3 100644 --- a/extra/annotations/annotations-docs.factor +++ b/extra/annotations/annotations-docs.factor @@ -4,9 +4,9 @@ words combinators.smart tools.crossref ; IN: annotations : $annotation ( element -- ) diff --git a/extra/classes/struct/vectored/vectored.factor b/extra/classes/struct/vectored/vectored.factor index e6f45ab245..4ad9f4f061 100644 --- a/extra/classes/struct/vectored/vectored.factor +++ b/extra/classes/struct/vectored/vectored.factor @@ -7,11 +7,11 @@ IN: classes.struct.vectored > "-array" append swap lookup ] bi ; + [ define-array-vocab ] [ name>> "-array" append swap lookup-word ] bi ; : -of ( type -- array-type ) - [ define-array-vocab ] [ name>> "<" "-array>" surround swap lookup ] bi ; + [ define-array-vocab ] [ name>> "<" "-array>" surround swap lookup-word ] bi ; : (array-class)-of ( type -- array-type ) - [ define-array-vocab ] [ name>> "(" "-array)" surround swap lookup ] bi ; + [ define-array-vocab ] [ name>> "(" "-array)" surround swap lookup-word ] bi ; : >vectored-slot ( struct-slot offset -- tuple-slot ) { diff --git a/extra/graphviz/notation/notation.factor b/extra/graphviz/notation/notation.factor index 1d7d95b636..3066f7b721 100644 --- a/extra/graphviz/notation/notation.factor +++ b/extra/graphviz/notation/notation.factor @@ -20,7 +20,7 @@ IN: graphviz.notation ! present >>attr ; : =attr-generic ( name -- generic ) - "=" prepend "graphviz.notation" 2dup lookup + "=" prepend "graphviz.notation" 2dup lookup-word [ 2nip ] [ create dup 1 diff --git a/extra/llvm/types/types.factor b/extra/llvm/types/types.factor index be23db36b3..0dfb6befa9 100644 --- a/extra/llvm/types/types.factor +++ b/extra/llvm/types/types.factor @@ -218,8 +218,8 @@ WhiteNumberSpace = WhiteSpace Number:n WhiteSpace => [[ n ]] WhiteZeroSpace = WhiteSpace (Zero | Number):n WhiteSpace => [[ n ]] Integer = "i" Number:n => [[ n ]] -FloatingPoint = ( "float" | "double" | "x86_fp80" | "fp128" | "ppc_fp128" ) => [[ "llvm.types" vocab lookup ]] -LabelVoidMetadata = ( "label" | "void" | "metadata" | "opaque" ) => [[ "llvm.types" vocab lookup ]] +FloatingPoint = ( "float" | "double" | "x86_fp80" | "fp128" | "ppc_fp128" ) => [[ "llvm.types" vocab lookup-word ]] +LabelVoidMetadata = ( "label" | "void" | "metadata" | "opaque" ) => [[ "llvm.types" vocab lookup-word ]] Primitive = LabelVoidMetadata | FloatingPoint Pointer = T:t WhiteSpace "*" => [[ t ]] Vector = "<" WhiteNumberSpace:n "x" Type:t ">" => [[ n t ]] diff --git a/extra/mongodb/tuple/persistent/persistent.factor b/extra/mongodb/tuple/persistent/persistent.factor index 3b741bd963..352c28599e 100644 --- a/extra/mongodb/tuple/persistent/persistent.factor +++ b/extra/mongodb/tuple/persistent/persistent.factor @@ -16,7 +16,7 @@ DEFER: assoc>tuple tuple-class ( tuple-info -- class ) - [ first ] keep second lookup ; inline + [ first ] keep second lookup-word ; inline : tuple-instance ( tuple-info -- instance ) mdbinfo>tuple-class new ; inline diff --git a/extra/slots/syntax/syntax.factor b/extra/slots/syntax/syntax.factor index cda8d402e6..144dfc1c06 100755 --- a/extra/slots/syntax/syntax.factor +++ b/extra/slots/syntax/syntax.factor @@ -13,10 +13,10 @@ SYNTAX: slots{ '[ [ _ cleave ] output>array ] append! ; : >>writer-word ( name -- word ) - ">>" prepend "accessors" lookup ; + ">>" prepend "accessors" lookup-word ; : writer-word<< ( name -- word ) - ">>" prepend "accessors" lookup ; + ">>" prepend "accessors" lookup-word ; SYNTAX: set-slots[ "]" [ >>writer-word 1quotation ] map-tokens diff --git a/extra/smalltalk/compiler/compiler.factor b/extra/smalltalk/compiler/compiler.factor index fcb76c4135..8acf8d17b6 100644 --- a/extra/smalltalk/compiler/compiler.factor +++ b/extra/smalltalk/compiler/compiler.factor @@ -149,7 +149,7 @@ ERROR: no-word name ; M: ast-foreign compile-ast nip - [ class>> dup ":" split1 lookup [ ] [ no-word ] ?if ] + [ class>> dup ":" split1 lookup-word [ ] [ no-word ] ?if ] [ name>> ] bi define-foreign [ nil ] ; -- 2.34.1