diff --git a/core/alien/libraries/libraries-docs.factor b/core/alien/libraries/libraries-docs.factor index 0a4e5b8ee3..37cac845fb 100644 --- a/core/alien/libraries/libraries-docs.factor +++ b/core/alien/libraries/libraries-docs.factor @@ -45,7 +45,7 @@ HELP: load-library HELP: add-library { $values { "name" string } { "path" string } { "abi" "one of " { $link cdecl } " or " { $link stdcall } } } { $description "Defines a new logical library named " { $snippet "name" } " located in the file system at " { $snippet "path" } " and the specified ABI. You can find the location of the library via words in " { $vocab-link "alien.libraries.finder" } ". The logical library name can then be used by a " { $link postpone\ library: } " form to specify the logical library for subsequent " { $link postpone\ FUNCTION: } " definitions." } -{ $notes "Because the entire source file is parsed before top-level forms are executed, " { $link add-library } " must be placed within a " { $snippet "<< ... >>" } " parse-time evaluation block." +{ $notes "Because the entire source file is parsed before top-level forms are executed, " { $link add-library } " must be placed within a " { $snippet "COMPILE< ... COMPILE>" } " parse-time evaluation block." $nl "This ensures that if the logical library is later used in the same file, for example by a " { $link postpone\ FUNCTION: } " definition. Otherwise, the " { $link add-library } " call will happen too late, after compilation, and the C function calls will not refer to the correct library." $nl diff --git a/core/compiler/units/units-docs.factor b/core/compiler/units/units-docs.factor index f60cbeb04f..ca70ce2b54 100644 --- a/core/compiler/units/units-docs.factor +++ b/core/compiler/units/units-docs.factor @@ -23,7 +23,7 @@ $nl ARTICLE: "compilation-units" "Compilation units" "A " { $emphasis "compilation unit" } " scopes a group of related definitions. They are compiled and entered into the system in one atomic operation." $nl -"When a source file is being parsed, all definitions are part of a single compilation unit, unless the " { $link postpone\ << } " parsing word is used to create nested compilation units." +"When a source file is being parsed, all definitions are part of a single compilation unit, unless the " { $link \ COMPILE< } " parsing word is used to create nested compilation units." $nl "Words defined in a compilation unit may not be called until the compilation unit is finished. The parser detects this case for parsing words and throws a " { $link staging-violation } ". Similarly, an attempt to use a macro from a word defined in the same compilation unit will throw a " { $link transform-expansion-error } ". Calling any other word from within its own compilation unit throws an " { $link undefined } " error." $nl diff --git a/core/compiler/units/units-tests.factor b/core/compiler/units/units-tests.factor index c9f0128e1c..f9f003dd8c 100644 --- a/core/compiler/units/units-tests.factor +++ b/core/compiler/units/units-tests.factor @@ -54,7 +54,7 @@ observer add-definition-observer defer: nesting-test -{ } [ "in: compiler.units.tests << : nesting-test ( -- ) ; >>" eval( -- ) ] unit-test +{ } [ "in: compiler.units.tests COMPILE< : nesting-test ( -- ) ; COMPILE>" eval( -- ) ] unit-test observer remove-definition-observer diff --git a/core/locals/parser/parser-tests.factor b/core/locals/parser/parser-tests.factor index 431954ef4f..59ffd12f23 100644 --- a/core/locals/parser/parser-tests.factor +++ b/core/locals/parser/parser-tests.factor @@ -3,7 +3,7 @@ locals.parser namespaces parser prettyprint sequences sorting tools.test vocabs vocabs.parser ; in: locals.parser.tests -! XXX: remove the << and >> below and make test-all pass +! XXX: remove the COMPILE< and COMPILE> below and make test-all pass COMPILE< ! (::) diff --git a/core/parser/parser-docs.factor b/core/parser/parser-docs.factor index ec23a1ea8d..209464ed0d 100644 --- a/core/parser/parser-docs.factor +++ b/core/parser/parser-docs.factor @@ -278,7 +278,7 @@ HELP: staging-violation { $values { "word" word } } { $description "Throws a " { $link staging-violation } " error." } { $error-description "Thrown by the parser if a parsing word is used in the same compilation unit as where it was defined; see " { $link "compilation-units" } "." } -{ $notes "One possible workaround is to use the " { $link postpone\ << } " word to execute code at parse time. However, executing words defined in the same source file at parse time is still prohibited." } ; +{ $notes "One possible workaround is to use the " { $link \ COMPILE< } " word to execute code at parse time. However, executing words defined in the same source file at parse time is still prohibited." } ; HELP: auto-use? { $var-description "If set to a true value, the behavior of the parser when encountering an unknown word name is changed. If only one loaded vocabulary has a word with this name, instead of throwing an error, the parser adds the vocabulary to the search path and prints a parse note. Off by default." } diff --git a/core/parser/parser-tests.factor b/core/parser/parser-tests.factor index 10191fe65f..c5ed236719 100644 --- a/core/parser/parser-tests.factor +++ b/core/parser/parser-tests.factor @@ -466,7 +466,7 @@ defer: foo { 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 ;" + "in: parser.tests COMPILE< : staging-problem-test-1 ( -- a ) 1 ; COMPILE> : staging-problem-test-2 ( -- a ) staging-problem-test-1 ;" "staging-problem-test" parse-stream ] unit-test @@ -539,7 +539,7 @@ EXCLUDE: qualified.tests.bar => x ; ! Two similar bugs -! Replace : def with something in << COMPILE> +! Replace : def with something in COMPILE< COMPILE> /* { [ ] } [ "in: parser.tests : was-once-a-word-bug ( -- ) ;" "was-once-a-word-test" parse-stream @@ -548,7 +548,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-word [ ] ( -- ) define-declared >>" + "in: parser.tests use: words COMPILE< \"was-once-a-word-bug\" \"parser.tests\" create-word [ ] ( -- ) define-declared COMPILE>" "was-once-a-word-test" parse-stream ] unit-test diff --git a/core/syntax/syntax-docs.factor b/core/syntax/syntax-docs.factor index 63448fb8f0..5531fb46b3 100644 --- a/core/syntax/syntax-docs.factor +++ b/core/syntax/syntax-docs.factor @@ -884,7 +884,7 @@ HELP: call-next-method { \ call-next-method (call-next-method) next-method } related-words -{ \ << \ >> } related-words +{ \ COMPILE< \ COMPILE> } related-words HELP: \ call( { $syntax "call( stack -- effect )" } diff --git a/core/words/words-tests.factor b/core/words/words-tests.factor index f4262e6f1f..f4012e824c 100644 --- a/core/words/words-tests.factor +++ b/core/words/words-tests.factor @@ -67,7 +67,7 @@ forget: another-forgotten defer: deferred [ deferred ] [ T{ undefined-word f deferred } = ] must-fail-with -[ "in: words.tests defer: not-compiled << not-compiled >>" eval( -- ) ] +[ "in: words.tests defer: not-compiled COMPILE< not-compiled COMPILE>" eval( -- ) ] [ error>> [ undefined-word? ] [ word>> name>> "not-compiled" = ] bi and ] must-fail-with { } [ "in: words.tests forget: not-compiled" eval( -- ) ] unit-test @@ -85,7 +85,7 @@ defer: deferred [ forget ] with-compilation-unit ] when* -[ "in: words.tests : undef-test ( -- ) ; << undef-test >>" eval( -- ) ] +[ "in: words.tests : undef-test ( -- ) ; COMPILE< undef-test COMPILE>" eval( -- ) ] [ error>> undefined-word? ] must-fail-with { } [ diff --git a/ffi/python/ffi/ffi.factor b/ffi/python/ffi/ffi.factor index 9b8a8bd3a9..04ad02e6e4 100644 --- a/ffi/python/ffi/ffi.factor +++ b/ffi/python/ffi/ffi.factor @@ -3,7 +3,7 @@ alien.libraries.finder alien.syntax assocs classes.struct kernel sequences system ; in: python.ffi -! << "python" { "3.0" "3" "2.7" "2.6" } ! Python 3 has a different api, enable someday +! COMPILE< "python" { "3.0" "3" "2.7" "2.6" } ! Python 3 has a different api, enable someday COMPILE< "python" { "python2.7" "python2.6" "python27" "python26" } find-library-from-list cdecl add-library COMPILE> diff --git a/language/alien/libraries/finder/finder-docs.factor b/language/alien/libraries/finder/finder-docs.factor index 0cdc54dc85..e4b6bc9bcd 100644 --- a/language/alien/libraries/finder/finder-docs.factor +++ b/language/alien/libraries/finder/finder-docs.factor @@ -18,7 +18,7 @@ HELP: find-library { $description "Used to load libraries whose exact filenames is not known in advance:" { $code - "<< \"sqlite\" \"sqlite3\" find-library cdecl add-library >>" + "COMPILE< \"sqlite\" \"sqlite3\" find-library cdecl add-library COMPILE>" } - "Note the parse time evaluation with " { $link postpone\ << } "." + "Note the parse time evaluation with " { $link \ COMPILE< } "." } ; diff --git a/language/compiler/tests/redefine21.factor b/language/compiler/tests/redefine21.factor index dca56590de..ca0a64d640 100644 --- a/language/compiler/tests/redefine21.factor +++ b/language/compiler/tests/redefine21.factor @@ -1,10 +1,10 @@ USING: kernel tools.test definitions compiler.units ; in: compiler.tests.redefine21 -[ ] [ : a ( -- ) ; << : b ( quot -- ) call a ; inline COMPILE> [ ] b ] unit-test +[ ] [ : a ( -- ) ; COMPILE< : b ( quot -- ) call a ; inline COMPILE> [ ] b ] unit-test [ ] [ [ { a b } forget-all ] with-compilation-unit ] unit-test -[ ] [ : A ( -- ) ; << : B ( -- ) A ; inline COMPILE> B ] unit-test +[ ] [ : A ( -- ) ; COMPILE< : B ( -- ) A ; inline COMPILE> B ] unit-test [ ] [ [ { A B } forget-all ] with-compilation-unit ] unit-test diff --git a/language/functors/functors-tests.factor b/language/functors/functors-tests.factor index ea55b0e890..c2ae433912 100644 --- a/language/functors/functors-tests.factor +++ b/language/functors/functors-tests.factor @@ -145,7 +145,7 @@ FUNCTOR; [ [ ] ] [ "in: functors.tests - << \"some\" redefine-test >>" "functors-test" parse-stream + COMPILE< \"some\" redefine-test COMPILE>" "functors-test" parse-stream ] unit-test test-redefinition diff --git a/language/serialize/serialize-tests.factor b/language/serialize/serialize-tests.factor index 86b6196153..646ed6588a 100644 --- a/language/serialize/serialize-tests.factor +++ b/language/serialize/serialize-tests.factor @@ -59,7 +59,7 @@ CONSTANT: objects B{ 50 13 55 64 1 } ?{ t f t f f t f } double-array{ 1.0 3.0 4.0 1.0 2.35 0.33 } - << 1 [ 2 ] curry suffix! COMPILE> + COMPILE< 1 [ 2 ] curry suffix! COMPILE> { { "a" "bc" } { "de" "fg" } } H{ { "a" "bc" } { "de" "fg" } } } ; diff --git a/language/vocabs/prettyprint/prettyprint-tests.factor b/language/vocabs/prettyprint/prettyprint-tests.factor index 207d7ba821..eb669ba816 100644 --- a/language/vocabs/prettyprint/prettyprint-tests.factor +++ b/language/vocabs/prettyprint/prettyprint-tests.factor @@ -5,7 +5,7 @@ in: vocabs.prettyprint.tests : manifest-test-1 ( -- string ) "USING: kernel namespaces vocabs.parser vocabs.prettyprint ; - << manifest get pprint-manifest >>" ; + COMPILE< manifest get pprint-manifest COMPILE>" ; { "USING: kernel namespaces vocabs.parser vocabs.prettyprint ;" @@ -16,7 +16,7 @@ in: vocabs.prettyprint.tests "USING: kernel namespaces vocabs.parser vocabs.prettyprint ; in: vocabs.prettyprint.tests - << manifest get pprint-manifest >>" ; + COMPILE< manifest get pprint-manifest COMPILE>" ; { "USING: kernel namespaces vocabs.parser vocabs.prettyprint ; @@ -32,7 +32,7 @@ in: vocabs.prettyprint.tests" EXCLUDE: parser => run-file ; in: vocabs.prettyprint.tests - << manifest get pprint-manifest >>" ; + COMPILE< manifest get pprint-manifest COMPILE>" ; { "USING: kernel namespaces vocabs.parser vocabs.prettyprint ;