factor: core/ lexes! bi@ etc are a problem because they are not decorators.

locals-and-roots
Doug Coleman 2016-06-04 02:49:14 -07:00
parent 6f23279be6
commit 0109c44ebc
84 changed files with 187 additions and 185 deletions

View File

@ -1,6 +1,6 @@
USING: kernel locals math math.matrices.simd math.order math.vectors USING: kernel locals math math.matrices.simd math.order math.vectors
math.vectors.simd prettyprint sequences typed ; math.vectors.simd prettyprint sequences typed ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: benchmark.3d-matrix-vector in: benchmark.3d-matrix-vector
: v2min ( xy -- xx ) : v2min ( xy -- xx )

View File

@ -2,7 +2,7 @@
USING: assocs benchmark.reverse-complement byte-arrays fry io USING: assocs benchmark.reverse-complement byte-arrays fry io
io.encodings.ascii io.files locals kernel math sequences io.encodings.ascii io.files locals kernel math sequences
sequences.private specialized-arrays strings typed alien.data ; sequences.private specialized-arrays strings typed alien.data ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:double SPECIALIZED-ARRAY: c:double
in: benchmark.fasta in: benchmark.fasta

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: kernel io math math.functions math.parser math.vectors USING: kernel io math math.functions math.parser math.vectors
math.vectors.simd sequences specialized-arrays ; math.vectors.simd sequences specialized-arrays ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: float-4 SPECIALIZED-ARRAY: float-4
in: benchmark.simd-1 in: benchmark.simd-1

View File

@ -1,6 +1,6 @@
USING: specialized-arrays sequences.complex USING: specialized-arrays sequences.complex
kernel sequences tools.test arrays accessors ; kernel sequences tools.test arrays accessors ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
in: sequences.complex.tests in: sequences.complex.tests

View File

@ -66,6 +66,7 @@ in: bootstrap.syntax
"unuse:" "unuse:"
"USING:" "USING:"
"QUALIFIED:" "QUALIFIED:"
"qualified:"
"QUALIFIED-WITH:" "QUALIFIED-WITH:"
"FROM:" "FROM:"
"EXCLUDE:" "EXCLUDE:"

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors definitions generic generic.single kernel USING: accessors definitions generic generic.single kernel
kernel.private namespaces quotations sequences words ; kernel.private namespaces quotations sequences words ;
QUALIFIED-WITH: generic.single.private gsp QUALIFIED-WITH: generic.single.private gsp ;
in: generic.hook in: generic.hook
TUPLE: hook-combination < single-combination var ; TUPLE: hook-combination < single-combination var ;

View File

@ -4,7 +4,7 @@ compiler.units definitions eval generic generic.single
generic.standard io.streams.string kernel make math generic.standard io.streams.string kernel make math
math.constants math.functions namespaces parser quotations math.constants math.functions namespaces parser quotations
sequences specialized-vectors strings tools.test words ; sequences specialized-vectors strings tools.test words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-VECTOR: c:double SPECIALIZED-VECTOR: c:double
in: generic.standard.tests in: generic.standard.tests

View File

@ -65,7 +65,7 @@ ERROR: no-parent-directory path ;
{ {
{ [ dup "\\\\?\\" head? ] [ t ] } { [ dup "\\\\?\\" head? ] [ t ] }
{ [ dup length 2 < ] [ f ] } { [ dup length 2 < ] [ f ] }
{ [ dup second char: : = ] [ t ] } { [ dup second char: \: = ] [ t ] }
[ f ] [ f ]
} cond ; } cond ;

View File

@ -180,44 +180,44 @@ CONSTANT: min-magnitude-2 -1074 ;
: ?add-ratio ( m n/f -- m+n/f ) : ?add-ratio ( m n/f -- m+n/f )
dup ratio? [ + ] [ 2drop f ] if ; inline dup ratio? [ + ] [ 2drop f ] if ; inline
: @abort ( i number-parse n x -- f ) : abort-parse ( i number-parse n x -- f )
4drop f ; inline 4drop f ; inline
: @split ( i number-parse n -- n i number-parse' n' ) : parse-split ( i number-parse n -- n i number-parse' n' )
-rot 0 >>magnitude 0 ; inline -rot 0 >>magnitude 0 ; inline
: @split-exponent ( i number-parse n -- n i number-parse' n' ) : parse-split-exponent ( i number-parse n -- n i number-parse' n' )
-rot 10 >>radix 0 ; inline -rot 10 >>radix 0 ; inline
: <float-parse> ( i number-parse n -- float-parse i number-parse n ) : <float-parse> ( i number-parse n -- float-parse i number-parse n )
[ drop nip [ radix>> ] [ magnitude>> ] bi [ 0 f ] dip float-parse boa ] 3keep ; inline [ drop nip [ radix>> ] [ magnitude>> ] bi [ 0 f ] dip float-parse boa ] 3keep ; inline
defer: @exponent-digit defer: parse-exponent-digit
defer: @mantissa-digit defer: parse-mantissa-digit
defer: @denom-digit defer: parse-denom-digit
defer: @num-digit defer: parse-num-digit
defer: @pos-digit defer: parse-pos-digit
defer: @neg-digit defer: parse-neg-digit
: @exponent-digit-or-punc ( float-parse i number-parse n char -- float-parse n/f ) : parse-exponent-digit-or-punc ( float-parse i number-parse n char -- float-parse n/f )
{ {
{ char: , [ [ @exponent-digit ] require-next-digit ] } { char: , [ [ parse-exponent-digit ] require-next-digit ] }
[ @exponent-digit ] [ parse-exponent-digit ]
} case ; inline } case ; inline
: @exponent-digit ( float-parse i number-parse n char -- float-parse n/f ) : parse-exponent-digit ( float-parse i number-parse n char -- float-parse n/f )
{ float-parse fixnum number-parse integer fixnum } declare { float-parse fixnum number-parse integer fixnum } declare
digit-in-radix [ [ @exponent-digit-or-punc ] add-exponent-digit ] [ @abort ] if ; digit-in-radix [ [ parse-exponent-digit-or-punc ] add-exponent-digit ] [ abort-parse ] if ;
: @exponent-first-char ( float-parse i number-parse n char -- float-parse n/f ) : parse-exponent-first-char ( float-parse i number-parse n char -- float-parse n/f )
{ {
{ char: - [ [ @exponent-digit ] require-next-digit ?neg ] } { char: - [ [ parse-exponent-digit ] require-next-digit ?neg ] }
{ char: + [ [ @exponent-digit ] require-next-digit ] } { char: + [ [ parse-exponent-digit ] require-next-digit ] }
[ @exponent-digit ] [ parse-exponent-digit ]
} case ; inline } case ; inline
: ->exponent ( float-parse i number-parse n -- float-parse' n/f ) : ->exponent ( float-parse i number-parse n -- float-parse' n/f )
@split-exponent [ @exponent-first-char ] require-next-digit ?store-exponent ; inline parse-split-exponent [ parse-exponent-first-char ] require-next-digit ?store-exponent ; inline
: exponent-char? ( number-parse n char -- number-parse n char ? ) : exponent-char? ( number-parse n char -- number-parse n char ? )
pick radix>> { pick radix>> {
@ -231,74 +231,74 @@ defer: @neg-digit
: or-mantissa->exponent ( float-parse i number-parse n char quot -- float-parse n/f ) : or-mantissa->exponent ( float-parse i number-parse n char quot -- float-parse n/f )
[ exponent-char? [ drop ->exponent ] ] dip if ; inline [ exponent-char? [ drop ->exponent ] ] dip if ; inline
: @mantissa-digit-or-punc ( float-parse i number-parse n char -- float-parse n/f ) : parse-mantissa-digit-or-punc ( float-parse i number-parse n char -- float-parse n/f )
{ {
{ char: , [ [ @mantissa-digit ] require-next-digit ] } { char: , [ [ parse-mantissa-digit ] require-next-digit ] }
[ @mantissa-digit ] [ parse-mantissa-digit ]
} case ; inline } case ; inline
: @mantissa-digit ( float-parse i number-parse n char -- float-parse n/f ) : parse-mantissa-digit ( float-parse i number-parse n char -- float-parse n/f )
{ float-parse fixnum number-parse integer fixnum } declare { float-parse fixnum number-parse integer fixnum } declare
[ [
digit-in-radix digit-in-radix
[ [ @mantissa-digit-or-punc ] add-mantissa-digit ] [ [ parse-mantissa-digit-or-punc ] add-mantissa-digit ]
[ @abort ] if [ abort-parse ] if
] or-mantissa->exponent ; ] or-mantissa->exponent ;
: ->mantissa ( i number-parse n -- n/f ) : ->mantissa ( i number-parse n -- n/f )
<float-parse> [ @mantissa-digit ] next-digit ?make-float ; inline <float-parse> [ parse-mantissa-digit ] next-digit ?make-float ; inline
: ->required-mantissa ( i number-parse n -- n/f ) : ->required-mantissa ( i number-parse n -- n/f )
<float-parse> [ @mantissa-digit ] require-next-digit ?make-float ; inline <float-parse> [ parse-mantissa-digit ] require-next-digit ?make-float ; inline
: @denom-digit-or-punc ( i number-parse n char -- n/f ) : parse-denom-digit-or-punc ( i number-parse n char -- n/f )
{ {
{ char: , [ [ @denom-digit ] require-next-digit ] } { char: , [ [ parse-denom-digit ] require-next-digit ] }
{ char: . [ ->mantissa ] } { char: . [ ->mantissa ] }
[ [ @denom-digit ] or-exponent ] [ [ parse-denom-digit ] or-exponent ]
} case ; inline } case ; inline
: @denom-digit ( i number-parse n char -- n/f ) : parse-denom-digit ( i number-parse n char -- n/f )
{ fixnum number-parse integer fixnum } declare { fixnum number-parse integer fixnum } declare
digit-in-radix [ [ @denom-digit-or-punc ] add-digit ] [ @abort ] if ; digit-in-radix [ [ parse-denom-digit-or-punc ] add-digit ] [ abort-parse ] if ;
: @denom-first-digit ( i number-parse n char -- n/f ) : parse-denom-first-digit ( i number-parse n char -- n/f )
{ {
{ char: . [ ->mantissa ] } { char: . [ ->mantissa ] }
[ @denom-digit ] [ parse-denom-digit ]
} case ; inline } case ; inline
: ->denominator ( i number-parse n -- n/f ) : ->denominator ( i number-parse n -- n/f )
{ fixnum number-parse integer } declare { fixnum number-parse integer } declare
@split [ @denom-first-digit ] require-next-digit ?make-ratio ; parse-split [ parse-denom-first-digit ] require-next-digit ?make-ratio ;
: @num-digit-or-punc ( i number-parse n char -- n/f ) : parse-num-digit-or-punc ( i number-parse n char -- n/f )
{ {
{ char: , [ [ @num-digit ] require-next-digit ] } { char: , [ [ parse-num-digit ] require-next-digit ] }
{ char: / [ ->denominator ] } { char: / [ ->denominator ] }
[ @num-digit ] [ parse-num-digit ]
} case ; inline } case ; inline
: @num-digit ( i number-parse n char -- n/f ) : parse-num-digit ( i number-parse n char -- n/f )
{ fixnum number-parse integer fixnum } declare { fixnum number-parse integer fixnum } declare
digit-in-radix [ [ @num-digit-or-punc ] add-digit ] [ @abort ] if ; digit-in-radix [ [ parse-num-digit-or-punc ] add-digit ] [ abort-parse ] if ;
: ->numerator ( i number-parse n -- n/f ) : ->numerator ( i number-parse n -- n/f )
{ fixnum number-parse integer } declare { fixnum number-parse integer } declare
@split [ @num-digit ] require-next-digit ?add-ratio ; parse-split [ parse-num-digit ] require-next-digit ?add-ratio ;
: @pos-digit-or-punc ( i number-parse n char -- n/f ) : parse-pos-digit-or-punc ( i number-parse n char -- n/f )
{ {
{ char: , [ [ @pos-digit ] require-next-digit ] } { char: , [ [ parse-pos-digit ] require-next-digit ] }
{ char: + [ ->numerator ] } { char: + [ ->numerator ] }
{ char: / [ ->denominator ] } { char: / [ ->denominator ] }
{ char: . [ ->mantissa ] } { char: . [ ->mantissa ] }
[ [ @pos-digit ] or-exponent ] [ [ parse-pos-digit ] or-exponent ]
} case ; inline } case ; inline
: @pos-digit ( i number-parse n char -- n/f ) : parse-pos-digit ( i number-parse n char -- n/f )
{ fixnum number-parse integer fixnum } declare { fixnum number-parse integer fixnum } declare
digit-in-radix [ [ @pos-digit-or-punc ] add-digit ] [ @abort ] if ; digit-in-radix [ [ parse-pos-digit-or-punc ] add-digit ] [ abort-parse ] if ;
: ->radix ( i number-parse n quot radix -- i number-parse n quot ) : ->radix ( i number-parse n quot radix -- i number-parse n quot )
[ >>radix ] curry 2dip ; inline [ >>radix ] curry 2dip ; inline
@ -313,66 +313,66 @@ defer: @neg-digit
} case } case
] 2curry next-digit ; inline ] 2curry next-digit ; inline
: @pos-first-digit ( i number-parse n char -- n/f ) : parse-pos-first-digit ( i number-parse n char -- n/f )
{ {
{ char: . [ ->required-mantissa ] } { char: . [ ->required-mantissa ] }
{ char: 0 [ [ @pos-digit ] [ @pos-digit-or-punc ] with-radix-char ] } { char: 0 [ [ parse-pos-digit ] [ parse-pos-digit-or-punc ] with-radix-char ] }
[ @pos-digit ] [ parse-pos-digit ]
} case ; inline } case ; inline
: @neg-digit-or-punc ( i number-parse n char -- n/f ) : parse-neg-digit-or-punc ( i number-parse n char -- n/f )
{ {
{ char: , [ [ @neg-digit ] require-next-digit ] } { char: , [ [ parse-neg-digit ] require-next-digit ] }
{ char: - [ ->numerator ] } { char: - [ ->numerator ] }
{ char: / [ ->denominator ] } { char: / [ ->denominator ] }
{ char: . [ ->mantissa ] } { char: . [ ->mantissa ] }
[ [ @neg-digit ] or-exponent ] [ [ parse-neg-digit ] or-exponent ]
} case ; inline } case ; inline
: @neg-digit ( i number-parse n char -- n/f ) : parse-neg-digit ( i number-parse n char -- n/f )
{ fixnum number-parse integer fixnum } declare { fixnum number-parse integer fixnum } declare
digit-in-radix [ [ @neg-digit-or-punc ] add-digit ] [ @abort ] if ; digit-in-radix [ [ parse-neg-digit-or-punc ] add-digit ] [ abort-parse ] if ;
: @neg-first-digit ( i number-parse n char -- n/f ) : parse-neg-first-digit ( i number-parse n char -- n/f )
{ {
{ char: . [ ->required-mantissa ] } { char: . [ ->required-mantissa ] }
{ char: 0 [ [ @neg-digit ] [ @neg-digit-or-punc ] with-radix-char ] } { char: 0 [ [ parse-neg-digit ] [ parse-neg-digit-or-punc ] with-radix-char ] }
[ @neg-digit ] [ parse-neg-digit ]
} case ; inline } case ; inline
: @first-char ( i number-parse n char -- n/f ) : parse-first-char ( i number-parse n char -- n/f )
{ {
{ char: - [ [ @neg-first-digit ] require-next-digit ?neg ] } { char: - [ [ parse-neg-first-digit ] require-next-digit ?neg ] }
{ char: + [ [ @pos-first-digit ] require-next-digit ] } { char: + [ [ parse-pos-first-digit ] require-next-digit ] }
[ @pos-first-digit ] [ parse-pos-first-digit ]
} case ; inline } case ; inline
: @neg-first-digit-no-radix ( i number-parse n char -- n/f ) : parse-neg-first-digit-no-radix ( i number-parse n char -- n/f )
{ {
{ char: . [ ->required-mantissa ] } { char: . [ ->required-mantissa ] }
[ @neg-digit ] [ parse-neg-digit ]
} case ; inline } case ; inline
: @pos-first-digit-no-radix ( i number-parse n char -- n/f ) : parse-pos-first-digit-no-radix ( i number-parse n char -- n/f )
{ {
{ char: . [ ->required-mantissa ] } { char: . [ ->required-mantissa ] }
[ @pos-digit ] [ parse-pos-digit ]
} case ; inline } case ; inline
: @first-char-no-radix ( i number-parse n char -- n/f ) : parse-first-char-no-radix ( i number-parse n char -- n/f )
{ {
{ char: - [ [ @neg-first-digit-no-radix ] require-next-digit ?neg ] } { char: - [ [ parse-neg-first-digit-no-radix ] require-next-digit ?neg ] }
{ char: + [ [ @pos-first-digit-no-radix ] require-next-digit ] } { char: + [ [ parse-pos-first-digit-no-radix ] require-next-digit ] }
[ @pos-first-digit-no-radix ] [ parse-pos-first-digit-no-radix ]
} case ; inline } case ; inline
PRIVATE> PRIVATE>
: string>number ( str -- n/f ) : string>number ( str -- n/f )
10 <number-parse> [ @first-char ] require-next-digit ; 10 <number-parse> [ parse-first-char ] require-next-digit ;
: base> ( str radix -- n/f ) : base> ( str radix -- n/f )
<number-parse> [ @first-char-no-radix ] require-next-digit ; <number-parse> [ parse-first-char-no-radix ] require-next-digit ;
: bin> ( str -- n/f ) 2 base> ; inline : bin> ( str -- n/f ) 2 base> ; inline
: oct> ( str -- n/f ) 8 base> ; inline : oct> ( str -- n/f ) 8 base> ; inline

View File

@ -16,22 +16,22 @@ in: modern.compiler
: filter-using ( using -- using' ) : filter-using ( using -- using' )
{ "accessors" "threads.private" "threads" } diff ; { "accessors" "threads.private" "threads" } diff ;
<< ! <<
SYNTAX: STRING-DISPATCH: ! SYNTAX: STRING-DISPATCH:
[ ! [
scan-new-word scan-effect ! scan-new-word scan-effect
H{ } clone over [ in>> but-last ] [ out>> ] bi <effect> ! H{ } clone over [ in>> but-last ] [ out>> ] bi <effect>
'[ _ ?at [ throw ] unless _ call-effect ] ! '[ _ ?at [ throw ] unless _ call-effect ]
swap ! swap
] with-definition define-declared ; ! ] with-definition define-declared ;
SYNTAX: STRING-M: ! SYNTAX: STRING-M:
[ ! [
scan-token scan-word parse-definition ! scan-token scan-word parse-definition
over changed-definition ! over changed-definition
swap def>> first swapd set-at ! swap def>> first swapd set-at
] with-definition ; ! ] with-definition ;
>> ! >>
TUPLE: holder literal ; TUPLE: holder literal ;

View File

@ -6,11 +6,11 @@ in: modern.slices
: matching-delimiter ( ch -- ch' ) : matching-delimiter ( ch -- ch' )
H{ H{
{ char: ( char: ) } { char: \( char: ) }
{ char: [ char: ] } { char: \[ char: ] }
{ char: { char: } } { char: \{ char: } }
{ char: < char: > } { char: < char: > }
{ char: : char: ; } { char: \: char: ; }
} ?at drop ; } ?at drop ;
: matching-delimiter-string ( string -- string' ) : matching-delimiter-string ( string -- string' )

View File

@ -523,7 +523,7 @@ QUALIFIED: qualified.tests.foo
QUALIFIED: qualified.tests.bar QUALIFIED: qualified.tests.bar
{ 1 2 3 } [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test { 1 2 3 } [ qualified.tests.foo:x qualified.tests.bar:x x ] unit-test
QUALIFIED-WITH: qualified.tests.bar p QUALIFIED-WITH: qualified.tests.bar p ;
{ 2 } [ p:x ] unit-test { 2 } [ p:x ] unit-test
RENAME: x qualified.tests.baz => y RENAME: x qualified.tests.baz => y

View File

@ -25,7 +25,7 @@ stack-checker.transforms
stack-checker.dependencies stack-checker.dependencies
stack-checker.recursive-state stack-checker.recursive-state
stack-checker.row-polymorphism ; stack-checker.row-polymorphism ;
QUALIFIED-WITH: generic.single.private gsp QUALIFIED-WITH: generic.single.private gsp ;
in: stack-checker.known-words in: stack-checker.known-words
: infer-special ( word -- ) : infer-special ( word -- )

View File

@ -547,11 +547,11 @@ HELP: QUALIFIED:
} } ; } } ;
HELP: QUALIFIED-WITH: HELP: QUALIFIED-WITH:
{ $syntax "QUALIFIED-WITH: vocab word-prefix" } { $syntax "QUALIFIED-WITH: vocab word-prefix ;" }
{ $description "Like " { $link postpone: QUALIFIED: } " but uses " { $snippet "word-prefix" } " as prefix." } { $description "Like " { $link postpone: qualified: } " but uses " { $snippet "word-prefix" } " as prefix." }
{ $examples { $example { $examples { $example
"USING: prettyprint ;" "USING: prettyprint ;"
"QUALIFIED-WITH: math m" "QUALIFIED-WITH: math m ;"
"1 2 m:+ ." "1 2 m:+ ."
"3" "3"
} } ; } } ;

View File

@ -83,8 +83,9 @@ in: bootstrap.syntax
"USING:" [ ";" [ use-vocab ] each-token ] define-core-syntax "USING:" [ ";" [ use-vocab ] each-token ] define-core-syntax
"QUALIFIED:" [ scan-token dup add-qualified ] define-core-syntax "QUALIFIED:" [ scan-token dup add-qualified ] define-core-syntax
"qualified:" [ scan-token dup add-qualified ] define-core-syntax
"QUALIFIED-WITH:" [ scan-token scan-token add-qualified ] define-core-syntax "QUALIFIED-WITH:" [ scan-token scan-token ";" expect add-qualified ] define-core-syntax
"FROM:" [ "FROM:" [
scan-token "=>" expect ";" parse-tokens add-words-from scan-token "=>" expect ";" parse-tokens add-words-from

View File

@ -17,7 +17,7 @@ ARTICLE: "word-search-syntax" "Syntax to control word lookup"
{ $subsections { $subsections
postpone: use: postpone: use:
postpone: USING: postpone: USING:
postpone: QUALIFIED: postpone: qualified:
postpone: QUALIFIED-WITH: postpone: QUALIFIED-WITH:
} }
"Parsing words which make a subset of all words in a vocabulary available:" "Parsing words which make a subset of all words in a vocabulary available:"
@ -32,11 +32,11 @@ ARTICLE: "word-search-syntax" "Syntax to control word lookup"
{ $subsections postpone: in: } ; { $subsections postpone: in: } ;
ARTICLE: "word-search-semantics" "Resolution of ambiguous word names" ARTICLE: "word-search-semantics" "Resolution of ambiguous word names"
"There is a distinction between parsing words which perform “open” imports versus “closed” imports. An open import introduces all words from a vocabulary as identifiers, except possibly a finite set of exclusions. The " { $link postpone: use: } ", " { $link postpone: USING: } " and " { $link postpone: EXCLUDE: } " words perform open imports. A closed import only adds a fixed set of identifiers. The " { $link postpone: FROM: } ", " { $link postpone: RENAME: } ", " { $link postpone: QUALIFIED: } " and " { $link postpone: QUALIFIED-WITH: } " words perform closed imports. Note that the latter two are considered as closed imports, due to the fact that all identifiers they introduce are unambiguously qualified with a prefix. The " { $link postpone: in: } " parsing word also performs a closed import of the newly-created vocabulary." "There is a distinction between parsing words which perform “open” imports versus “closed” imports. An open import introduces all words from a vocabulary as identifiers, except possibly a finite set of exclusions. The " { $link postpone: use: } ", " { $link postpone: USING: } " and " { $link postpone: EXCLUDE: } " words perform open imports. A closed import only adds a fixed set of identifiers. The " { $link postpone: FROM: } ", " { $link postpone: RENAME: } ", " { $link postpone: qualified: } " and " { $link postpone: QUALIFIED-WITH: } " words perform closed imports. Note that the latter two are considered as closed imports, due to the fact that all identifiers they introduce are unambiguously qualified with a prefix. The " { $link postpone: in: } " parsing word also performs a closed import of the newly-created vocabulary."
$nl $nl
"When the parser encounters a reference to a word, it first searches the closed imports, in order. Closed imports are searched from the most recent to least recent. If the word could not be found this way, it searches open imports. Unlike closed imports, with open imports, the order does not matter -- instead, if more than one vocabulary defines a word with this name, an error is thrown." "When the parser encounters a reference to a word, it first searches the closed imports, in order. Closed imports are searched from the most recent to least recent. If the word could not be found this way, it searches open imports. Unlike closed imports, with open imports, the order does not matter -- instead, if more than one vocabulary defines a word with this name, an error is thrown."
{ $subsections ambiguous-use-error } { $subsections ambiguous-use-error }
"To resolve the error, add a closed import, using " { $link postpone: FROM: } ", " { $link postpone: QUALIFIED: } " or " { $link postpone: QUALIFIED-WITH: } ". The closed import will then take precedence over the open imports, and the ambiguity will be resolved." "To resolve the error, add a closed import, using " { $link postpone: FROM: } ", " { $link postpone: qualified: } " or " { $link postpone: QUALIFIED-WITH: } ". The closed import will then take precedence over the open imports, and the ambiguity will be resolved."
$nl $nl
"The rationale for this behavior is as follows. Open imports are named such because they are open to future extension; if a future version of a vocabulary that you use adds new words, those new words will now be in scope in your source file, too. To avoid problems, any references to the new word have to be resolved since the parser cannot safely determine which vocabulary was meant. This problem can be avoided entirely by using only closed imports, but this leads to additional verbosity." "The rationale for this behavior is as follows. Open imports are named such because they are open to future extension; if a future version of a vocabulary that you use adds new words, those new words will now be in scope in your source file, too. To avoid problems, any references to the new word have to be resolved since the parser cannot safely determine which vocabulary was meant. This problem can be avoided entirely by using only closed imports, but this leads to additional verbosity."
$nl $nl
@ -44,7 +44,7 @@ $nl
{ $list { $list
"Keep vocabularies small" "Keep vocabularies small"
{ "Hide internal words using " { $link postpone: <PRIVATE } } { "Hide internal words using " { $link postpone: <PRIVATE } }
{ "Make good use of " { $link postpone: FROM: } ", " { $link postpone: QUALIFIED: } " or " { $link postpone: QUALIFIED-WITH: } } { "Make good use of " { $link postpone: FROM: } ", " { $link postpone: qualified: } " or " { $link postpone: QUALIFIED-WITH: } }
} ; } ;
ARTICLE: "word-search-private" "Private words" ARTICLE: "word-search-private" "Private words"
@ -144,7 +144,7 @@ HELP: unuse-vocab
HELP: add-qualified HELP: add-qualified
{ $values { "vocab" "a vocabulary specifier" } { "prefix" string } } { $values { "vocab" "a vocabulary specifier" } { "prefix" string } }
{ $description "Adds the vocabulary's words, prefixed with the given string, to the current manifest." } { $description "Adds the vocabulary's words, prefixed with the given string, to the current manifest." }
{ $notes "If adding the vocabulary introduces ambiguity, the vocabulary will take precedence when resolving any ambiguous names. See the example in " { $link postpone: QUALIFIED: } " for further explanation." } ; { $notes "If adding the vocabulary introduces ambiguity, the vocabulary will take precedence when resolving any ambiguous names. See the example in " { $link postpone: qualified: } " for further explanation." } ;
HELP: add-words-from HELP: add-words-from
{ $values { "vocab" "a vocabulary specifier" } { "words" { $sequence "word names" } } } { $values { "vocab" "a vocabulary specifier" } { "words" { $sequence "word names" } } }
@ -170,7 +170,7 @@ HELP: unuse-words
{ $description "Removes an assoc mapping word names to words from the current manifest." } ; { $description "Removes an assoc mapping word names to words from the current manifest." } ;
HELP: ambiguous-use-error HELP: ambiguous-use-error
{ $error-description "Thrown when a word name referenced in source file is available in more than one vocabulary in the manifest. Such cases must be explicitly disambiguated using " { $link postpone: FROM: } ", " { $link postpone: EXCLUDE: } ", " { $link postpone: QUALIFIED: } ", or " { $link postpone: QUALIFIED-WITH: } "." } ; { $error-description "Thrown when a word name referenced in source file is available in more than one vocabulary in the manifest. Such cases must be explicitly disambiguated using " { $link postpone: FROM: } ", " { $link postpone: EXCLUDE: } ", " { $link postpone: qualified: } ", or " { $link postpone: QUALIFIED-WITH: } "." } ;
HELP: search-manifest HELP: search-manifest
{ $values { "name" string } { "manifest" manifest } { "word/f" { $maybe word } } } { $values { "name" string } { "manifest" manifest } { "word/f" { $maybe word } } }

View File

@ -7,7 +7,7 @@ opengl.demo-support opengl.gl sequences threads ui ui.gadgets
ui.gadgets.borders ui.gadgets.buttons ui.gadgets.frames ui.gadgets.borders ui.gadgets.buttons ui.gadgets.frames
ui.gadgets.grids ui.gadgets.labeled ui.gadgets.labels ui.gadgets.grids ui.gadgets.labeled ui.gadgets.labels
ui.gadgets.packs ui.gadgets.sliders ui.render ; ui.gadgets.packs ui.gadgets.sliders ui.render ;
QUALIFIED-WITH: models.range mr QUALIFIED-WITH: models.range mr ;
in: boids in: boids
TUPLE: boids-gadget < gadget paused boids behaviours dt ; TUPLE: boids-gadget < gadget paused boids behaviours dt ;

View File

@ -3,7 +3,7 @@ http.client io io.encodings.ascii io.files io.files.temp kernel
locals math math.matrices math.parser math.vectors opengl locals math math.matrices math.parser math.vectors opengl
opengl.capabilities opengl.gl opengl.demo-support sequences opengl.capabilities opengl.gl opengl.demo-support sequences
splitting vectors words specialized-arrays alien.data ; splitting vectors words specialized-arrays alien.data ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
SPECIALIZED-ARRAY: c:uint SPECIALIZED-ARRAY: c:uint
in: bunny.model in: bunny.model

View File

@ -6,7 +6,7 @@ combinators core-graphics.types fry generalizations
io.encodings.utf8 kernel layouts libc locals macros make math io.encodings.utf8 kernel layouts libc locals macros make math
memoize namespaces quotations sequences specialized-arrays memoize namespaces quotations sequences specialized-arrays
stack-checker strings words ; stack-checker strings words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: cocoa.messages in: cocoa.messages
SPECIALIZED-ARRAY: void* SPECIALIZED-ARRAY: void*

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.data alien.syntax combinators USING: alien.c-types alien.data alien.syntax combinators
core-foundation kernel math ; core-foundation kernel math ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
FROM: math => float ; FROM: math => float ;
in: core-foundation.numbers in: core-foundation.numbers

View File

@ -7,7 +7,7 @@ destructors fry init io io.backend io.encodings.string
io.encodings.utf8 kernel lexer locals macros math math.parser io.encodings.utf8 kernel lexer locals macros math math.parser
namespaces opengl.gl.extensions parser prettyprint quotations namespaces opengl.gl.extensions parser prettyprint quotations
sequences words ; sequences words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: cuda in: cuda
ERROR: cuda-error-state code ; ERROR: cuda-error-state code ;

View File

@ -5,7 +5,7 @@ byte-arrays classes.struct classes.struct.private combinators
combinators.short-circuit cuda cuda.ffi fry generalizations combinators.short-circuit cuda cuda.ffi fry generalizations
io.backend kernel locals macros math namespaces sequences io.backend kernel locals macros math namespaces sequences
variants vocabs.loader words ; variants vocabs.loader words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: cuda.libraries in: cuda.libraries
VARIANT: cuda-abi VARIANT: cuda-abi

View File

@ -4,7 +4,7 @@ USING: accessors alien alien.data alien.destructors assocs
byte-arrays cuda cuda.ffi destructors fry io.encodings.string byte-arrays cuda cuda.ffi destructors fry io.encodings.string
io.encodings.utf8 kernel locals math namespaces sequences io.encodings.utf8 kernel locals math namespaces sequences
strings ; strings ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: cuda.memory in: cuda.memory
: cuda-malloc ( n -- ptr ) : cuda-malloc ( n -- ptr )

View File

@ -6,7 +6,7 @@ classes.struct combinators continuations destructors fry
io.encodings.utf8 kernel libc locals math memoize multiline io.encodings.utf8 kernel libc locals math memoize multiline
namespaces sequences unix.ffi ; namespaces sequences unix.ffi ;
QUALIFIED-WITH: curses.ffi ffi QUALIFIED-WITH: curses.ffi ffi ;
in: curses in: curses

View File

@ -2,7 +2,7 @@
! This vocab only exports forward-compatible OpenGL 3.x symbols. ! This vocab only exports forward-compatible OpenGL 3.x symbols.
! For legacy OpenGL and extensions, use opengl.gl ! For legacy OpenGL and extensions, use opengl.gl
QUALIFIED-WITH: opengl.gl gl QUALIFIED-WITH: opengl.gl gl ;
in: opengl.gl3 in: opengl.gl3
ALIAS: GL_DEPTH_BUFFER_BIT gl:GL_DEPTH_BUFFER_BIT ; ALIAS: GL_DEPTH_BUFFER_BIT gl:GL_DEPTH_BUFFER_BIT ;

View File

@ -4,7 +4,7 @@ python.modules.__builtin__ python.modules.argparse python.modules.datetime
python.modules.os python.modules.os.path python.modules.sys python.modules.os python.modules.os.path python.modules.sys
python.modules.time python.objects python.syntax sets splitting tools.test python.modules.time python.objects python.syntax sets splitting tools.test
unicode ; unicode ;
QUALIFIED-WITH: sequences s QUALIFIED-WITH: sequences s ;
in: python.syntax.tests in: python.syntax.tests
: py-test ( result quot -- ) : py-test ( result quot -- )

View File

@ -3,7 +3,7 @@
USING: accessors arrays classes.struct io.streams.c kernel USING: accessors arrays classes.struct io.streams.c kernel
math system terminal unix unix.ffi ; math system terminal unix unix.ffi ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: terminal.linux in: terminal.linux

View File

@ -4,7 +4,7 @@
USING: accessors alien.c-types classes.struct io.streams.c USING: accessors alien.c-types classes.struct io.streams.c
kernel math memoize scratchpad system terminal unix unix.ffi ; kernel math memoize scratchpad system terminal unix unix.ffi ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: terminal.macosx in: terminal.macosx

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax kernel windows.types USING: alien alien.c-types alien.syntax kernel windows.types
math multiline classes.struct alien.data arrays literals ; math multiline classes.struct alien.data arrays literals ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: windows.kernel32 in: windows.kernel32
: lo-word ( wparam -- lo ) c:short <ref> c:short deref ; inline : lo-word ( wparam -- lo ) c:short <ref> c:short deref ; inline

View File

@ -5,7 +5,7 @@ hashtables kernel locals math math.parser sequences sequences.deep
splitting xml xml.data xml.traversal math.order namespaces splitting xml xml.data xml.traversal math.order namespaces
combinators images gpu.shaders io make game.models game.models.util combinators images gpu.shaders io make game.models game.models.util
io.encodings.ascii game.models.loader specialized-arrays ; io.encodings.ascii game.models.loader specialized-arrays ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:uint ; SPECIALIZED-ARRAYS: c:float c:uint ;
in: game.models.collada in: game.models.collada

View File

@ -5,7 +5,7 @@ kernel assocs io.files combinators math.order math namespaces
arrays sequences.deep accessors alien.c-types alien.data arrays sequences.deep accessors alien.c-types alien.data
game.models game.models.util gpu.shaders images game.models.loader game.models game.models.util gpu.shaders images game.models.loader
prettyprint specialized-arrays make ; prettyprint specialized-arrays make ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:uint ; SPECIALIZED-ARRAYS: c:float c:uint ;
in: game.models.obj in: game.models.obj

View File

@ -3,8 +3,8 @@ USING: alien alien.c-types alien.syntax byte-arrays classes
gpu.buffers gpu.framebuffers gpu.shaders gpu.textures help.markup gpu.buffers gpu.framebuffers gpu.shaders gpu.textures help.markup
help.syntax images kernel math sequences help.syntax images kernel math sequences
specialized-arrays strings ; specialized-arrays strings ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
QUALIFIED-WITH: math m QUALIFIED-WITH: math m ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
SPECIALIZED-ARRAY: int SPECIALIZED-ARRAY: int
SPECIALIZED-ARRAY: uint SPECIALIZED-ARRAY: uint

View File

@ -10,7 +10,7 @@ opengl.gl parser quotations sequences slots sorting
specialized-arrays strings ui.gadgets.worlds variants specialized-arrays strings ui.gadgets.worlds variants
vocabs.parser words math.vectors.simd ; vocabs.parser words math.vectors.simd ;
FROM: math => float ; FROM: math => float ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:int c:uchar c:ushort c:uint c:void* ; SPECIALIZED-ARRAYS: c:float c:int c:uchar c:ushort c:uint c:void* ;
in: gpu.render in: gpu.render

View File

@ -9,7 +9,7 @@ opengl opengl.gl opengl.shaders parser quotations sequences
specialized-arrays splitting strings tr ui.gadgets.worlds specialized-arrays splitting strings tr ui.gadgets.worlds
variants vectors vocabs vocabs.loader vocabs.parser words variants vectors vocabs vocabs.loader vocabs.parser words
words.constant math.floats.half typed ; words.constant math.floats.half typed ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: int SPECIALIZED-ARRAY: int
SPECIALIZED-ARRAY: void* SPECIALIZED-ARRAY: void*
in: gpu.shaders in: gpu.shaders

View File

@ -2,7 +2,7 @@
USING: accessors alien.c-types alien.data arrays byte-arrays USING: accessors alien.c-types alien.data arrays byte-arrays
combinators gpu kernel literals math math.rectangles opengl combinators gpu kernel literals math math.rectangles opengl
opengl.gl sequences typed variants specialized-arrays ; opengl.gl sequences typed variants specialized-arrays ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
FROM: math => float ; FROM: math => float ;
SPECIALIZED-ARRAY: c:int SPECIALIZED-ARRAY: c:int
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float

View File

@ -15,7 +15,7 @@ io.encodings.utf16n windows.errors literals ui.pixel-formats
ui.pixel-formats.private memoize classes colors ui.pixel-formats.private memoize classes colors
specialized-arrays classes.struct ; specialized-arrays classes.struct ;
SPECIALIZED-ARRAY: POINT SPECIALIZED-ARRAY: POINT
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: ui.backend.windows in: ui.backend.windows
singleton: windows-ui-backend singleton: windows-ui-backend

View File

@ -6,7 +6,7 @@ ui.gadgets ui.gadgets.borders ui.gadgets.buttons
ui.gadgets.labeled ui.gadgets.panes ui.gadgets.scrollers ui.gadgets.labeled ui.gadgets.panes ui.gadgets.scrollers
ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.toolbar ui.gadgets.status-bar ui.gadgets.tables ui.gadgets.toolbar
ui.theme ui.gadgets.tracks ui.gestures ui.theme.images ui.tools.common ; ui.theme ui.gadgets.tracks ui.gestures ui.theme.images ui.tools.common ;
QUALIFIED-WITH: ui.tools.inspector i QUALIFIED-WITH: ui.tools.inspector i ;
in: ui.tools.traceback in: ui.tools.traceback
TUPLE: stack-entry object string ; TUPLE: stack-entry object string ;

View File

@ -4,7 +4,7 @@ USING: accessors colors.constants combinators jamshred.log
jamshred.oint jamshred.sound jamshred.tunnel kernel locals math jamshred.oint jamshred.sound jamshred.tunnel kernel locals math
math.constants math.order math.ranges math.vectors math.matrices math.constants math.order math.ranges math.vectors math.matrices
sequences shuffle specialized-arrays strings system ; sequences shuffle specialized-arrays strings system ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
in: jamshred.player in: jamshred.player

View File

@ -9,7 +9,7 @@ terrain.generation terrain.shaders typed ui ui.gadgets
ui.gadgets.worlds ui.pixel-formats game.worlds ui.gadgets.worlds ui.pixel-formats game.worlds
math.matrices.simd noise ui.gestures combinators.short-circuit math.matrices.simd noise ui.gestures combinators.short-circuit
destructors grid-meshes math.vectors.simd ; destructors grid-meshes math.vectors.simd ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
in: terrain in: terrain

View File

@ -1,6 +1,6 @@
! (c)2010 Joe Groff bsd license ! (c)2010 Joe Groff bsd license
USING: alien.cxx kernel ; USING: alien.cxx kernel ;
QUALIFIED-WITH: alien.cxx.demangle.libstdcxx libstdcxx QUALIFIED-WITH: alien.cxx.demangle.libstdcxx libstdcxx ;
in: alien.cxx.demangle in: alien.cxx.demangle
GENERIC: c++-symbol? ( mangled-name abi -- ? ) ; GENERIC: c++-symbol? ( mangled-name abi -- ? ) ;

View File

@ -1,7 +1,7 @@
USING: alien alien.data alien.syntax classes.struct USING: alien alien.data alien.syntax classes.struct
compiler.units kernel sequences specialized-arrays compiler.units kernel sequences specialized-arrays
specialized-arrays.private system tools.test vocabs ; specialized-arrays.private system tools.test vocabs ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: alien.data.tests in: alien.data.tests
{ -1 } [ -1 c:char <ref> c:char deref ] unit-test { -1 } [ -1 c:char <ref> c:char deref ] unit-test

View File

@ -4,7 +4,7 @@ USING: accessors alien.accessors alien.c-types alien.data arrays
classes.struct.private combinators compiler.units endian fry classes.struct.private combinators compiler.units endian fry
generalizations kernel macros math math.bitwise namespaces generalizations kernel macros math math.bitwise namespaces
sequences slots words ; sequences slots words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: alien.endian in: alien.endian
ERROR: invalid-signed-conversion n ; ERROR: invalid-signed-conversion n ;

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Joe Groff ! Copyright (C) 2009 Joe Groff
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax kernel quotations sequences strings words.symbol classes.struct ; USING: help.markup help.syntax kernel quotations sequences strings words.symbol classes.struct ;
QUALIFIED-WITH: alien.syntax c QUALIFIED-WITH: alien.syntax c ;
in: alien.fortran in: alien.fortran
ARTICLE: "alien.fortran-abis" "Fortran ABIs" ARTICLE: "alien.fortran-abis" "Fortran ABIs"

View File

@ -5,7 +5,7 @@ classes.struct arrays assocs byte-arrays combinators fry
generalizations io.encodings.ascii kernel macros generalizations io.encodings.ascii kernel macros
macros.expander namespaces sequences shuffle tools.test vocabs.parser ; macros.expander namespaces sequences shuffle tools.test vocabs.parser ;
FROM: alien.syntax => pointer: ; FROM: alien.syntax => pointer: ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: alien.fortran.tests in: alien.fortran.tests
<< intel-unix-abi "(alien.fortran-tests)" (add-fortran-library) >> << intel-unix-abi "(alien.fortran-tests)" (add-fortran-library) >>

View File

@ -7,7 +7,7 @@ parser sequences sequences.generalizations splitting
stack-checker vectors vocabs.parser words locals stack-checker vectors vocabs.parser words locals
io.encodings.ascii io.encodings.string shuffle effects io.encodings.ascii io.encodings.string shuffle effects
math.ranges math.order sorting strings system alien.libraries ; math.ranges math.order sorting strings system alien.libraries ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: alien.fortran in: alien.fortran
SINGLETONS: f2c-abi g95-abi gfortran-abi intel-unix-abi intel-windows-abi ; SINGLETONS: f2c-abi g95-abi gfortran-abi intel-unix-abi intel-windows-abi ;

View File

@ -10,7 +10,7 @@ mirrors namespaces parser prettyprint prettyprint.config see
sequences specialized-arrays specialized-arrays.private sequences specialized-arrays specialized-arrays.private
system tools.test vocabs ; system tools.test vocabs ;
FROM: math => float ; FROM: math => float ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: char SPECIALIZED-ARRAY: char
SPECIALIZED-ARRAY: int SPECIALIZED-ARRAY: int
SPECIALIZED-ARRAY: ushort SPECIALIZED-ARRAY: ushort

View File

@ -5,7 +5,7 @@ combinators compiler.cfg.builder.alien.params compiler.cfg.hats
compiler.cfg.instructions compiler.cfg.intrinsics.allot compiler.cfg.instructions compiler.cfg.intrinsics.allot
compiler.cfg.registers cpu.architecture fry kernel layouts compiler.cfg.registers cpu.architecture fry kernel layouts
locals math namespaces sequences system ; locals math namespaces sequences system ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: compiler.cfg.builder.alien.boxing in: compiler.cfg.builder.alien.boxing
symbol: struct-return-area symbol: struct-return-area

View File

@ -6,7 +6,7 @@ compiler.cfg.predecessors compiler.cfg.utilities locals compiler.cfg.dce
compiler.cfg.ssa.destruction compiler.cfg.loop-detection compiler.cfg.ssa.destruction compiler.cfg.loop-detection
compiler.cfg.representations compiler.cfg assocs vectors arrays compiler.cfg.representations compiler.cfg assocs vectors arrays
layouts literals namespaces alien compiler.cfg.gvn.simd system ; layouts literals namespaces alien compiler.cfg.gvn.simd system ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: compiler.cfg.gvn.tests in: compiler.cfg.gvn.tests
: trim-temps ( insns -- insns ) : trim-temps ( insns -- insns )

View File

@ -7,7 +7,7 @@ compiler.cfg.value-numbering cpu.architecture kernel layouts
literals math namespaces sequences system tools.test ; literals math namespaces sequences system tools.test ;
! need cfg simd loaded for some tests ! need cfg simd loaded for some tests
use: compiler.cfg.value-numbering.simd use: compiler.cfg.value-numbering.simd
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: compiler.cfg.value-numbering.tests in: compiler.cfg.value-numbering.tests
: trim-temps ( insns -- insns ) : trim-temps ( insns -- insns )

View File

@ -1,7 +1,7 @@
USING: compiler.units compiler.test kernel kernel.private memory USING: compiler.units compiler.test kernel kernel.private memory
math math.private tools.test math.floats.private math.order fry math math.private tools.test math.floats.private math.order fry
specialized-arrays sequences math.functions layouts literals ; specialized-arrays sequences math.functions layouts literals ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
SPECIALIZED-ARRAY: c:double SPECIALIZED-ARRAY: c:double
in: compiler.tests.float in: compiler.tests.float

View File

@ -7,7 +7,7 @@ alien.accessors alien.c-types alien.data alien.syntax alien.strings
namespaces libc io.encodings.ascii classes compiler.test ; namespaces libc io.encodings.ascii classes compiler.test ;
FROM: math => float ; FROM: math => float ;
FROM: alien.c-types => short ; FROM: alien.c-types => short ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: compiler.tests.intrinsics in: compiler.tests.intrinsics
! Make sure that intrinsic ops compile to correct code. ! Make sure that intrinsic ops compile to correct code.

View File

@ -17,7 +17,7 @@ compiler.tree.propagation.info
compiler.tree.checker compiler.tree.checker
compiler.tree.debugger ; compiler.tree.debugger ;
FROM: math => float ; FROM: math => float ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: compiler.tree.cleanup.tests in: compiler.tree.cleanup.tests
{ t } [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test { t } [ [ [ 1 ] [ 2 ] if ] cleaned-up-tree [ #if? ] contains-node? ] unit-test

View File

@ -8,7 +8,7 @@ compiler.cfg.stack-frame compiler.codegen compiler.codegen.fixup
compiler.constants compiler.units cpu.architecture cpu.ppc.assembler fry io compiler.constants compiler.units cpu.architecture cpu.ppc.assembler fry io
kernel layouts literals locals make math math.order math.ranges memory kernel layouts literals locals make math math.order math.ranges memory
namespaces prettyprint sequences system vm words ; namespaces prettyprint sequences system vm words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
FROM: cpu.ppc.assembler => B ; FROM: cpu.ppc.assembler => B ;
FROM: math => float ; FROM: math => float ;
in: cpu.ppc in: cpu.ppc

View File

@ -4,7 +4,7 @@ USING: alien.data arrays assocs combinators compiler.cfg.comparisons
compiler.cfg.intrinsics cpu.architecture cpu.x86 cpu.x86.assembler compiler.cfg.intrinsics cpu.architecture cpu.x86 cpu.x86.assembler
cpu.x86.assembler.operands cpu.x86.features fry kernel locals macros cpu.x86.assembler.operands cpu.x86.features fry kernel locals macros
math math.vectors quotations sequences system ; math math.vectors quotations sequences system ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: cpu.x86.sse in: cpu.x86.sse
! Scalar floating point with SSE2 ! Scalar floating point with SSE2

View File

@ -10,7 +10,7 @@ compiler.units cpu.architecture cpu.x86.assembler
cpu.x86.assembler.operands cpu.x86.assembler.private cpu.x86.features cpu.x86.assembler.operands cpu.x86.assembler.private cpu.x86.features
cpu.x86.features.private fry io kernel layouts locals make math cpu.x86.features.private fry io kernel layouts locals make math
math.order memory namespaces sequences system vm vocabs ; math.order memory namespaces sequences system vm vocabs ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
FROM: kernel.private => declare ; FROM: kernel.private => declare ;
FROM: math => float ; FROM: math => float ;
in: cpu.x86 in: cpu.x86

View File

@ -1,6 +1,6 @@
USING: classes.struct classes.tuple functors tools.test math USING: classes.struct classes.tuple functors tools.test math
words kernel multiline parser io.streams.string generic ; words kernel multiline parser io.streams.string generic ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: functors.tests in: functors.tests
<< <<

View File

@ -27,8 +27,8 @@ in: vocabs.prettyprint.tests"
: manifest-test-3 ( -- string ) : manifest-test-3 ( -- string )
"USING: kernel namespaces vocabs.parser vocabs.prettyprint ; "USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
FROM: math => + - ; FROM: math => + - ;
QUALIFIED: system qualified: system
QUALIFIED-WITH: assocs a QUALIFIED-WITH: assocs a ;
EXCLUDE: parser => run-file ; EXCLUDE: parser => run-file ;
in: vocabs.prettyprint.tests in: vocabs.prettyprint.tests
@ -37,8 +37,8 @@ in: vocabs.prettyprint.tests"
{ {
"USING: kernel namespaces vocabs.parser vocabs.prettyprint ; "USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
FROM: math => + - ; FROM: math => + - ;
QUALIFIED: system qualified: system
QUALIFIED-WITH: assocs a QUALIFIED-WITH: assocs a ;
EXCLUDE: parser => run-file ; EXCLUDE: parser => run-file ;
in: vocabs.prettyprint.tests" in: vocabs.prettyprint.tests"
} }

View File

@ -30,11 +30,11 @@ GENERIC: pprint-qualified ( qualified -- ) ;
M: qualified pprint-qualified ( qualified -- ) M: qualified pprint-qualified ( qualified -- )
[ [
dup [ vocab>> vocab-name ] [ prefix>> ] bi = [ dup [ vocab>> vocab-name ] [ prefix>> ] bi = [
\ QUALIFIED: pprint-word \ qualified: pprint-word
vocab>> pprint-vocab vocab>> pprint-vocab
] [ ] [
\ QUALIFIED-WITH: pprint-word \ QUALIFIED-WITH: pprint-word
[ vocab>> pprint-vocab ] [ prefix>> text ] bi [ vocab>> pprint-vocab ] [ prefix>> text ] bi ";" text
] if ] if
] with-pprint ; ] with-pprint ;

View File

@ -3,7 +3,7 @@ USING: accessors alien alien.data audio classes.struct fry
calendar timers combinators combinators.short-circuit calendar timers combinators combinators.short-circuit
destructors generalizations kernel literals locals math openal destructors generalizations kernel literals locals math openal
sequences sequences.generalizations specialized-arrays strings ; sequences sequences.generalizations specialized-arrays strings ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:uchar c:uint ; SPECIALIZED-ARRAYS: c:float c:uchar c:uint ;
in: audio.engine in: audio.engine

View File

@ -4,7 +4,7 @@ byte-arrays classes.struct combinators destructors fry io
io.files io.encodings.binary kernel libc locals make math io.files io.encodings.binary kernel libc locals make math
math.order math.parser ogg ogg.vorbis sequences math.order math.parser ogg ogg.vorbis sequences
specialized-arrays specialized-vectors ; specialized-arrays specialized-vectors ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:void* ; SPECIALIZED-ARRAYS: c:float c:void* ;
SPECIALIZED-VECTOR: c:short SPECIALIZED-VECTOR: c:short
in: audio.vorbis in: audio.vorbis

View File

@ -5,7 +5,7 @@ hashtables io kernel locals math math.order math.parser
math.ranges multiline sequences bitstreams bit-arrays ; math.ranges multiline sequences bitstreams bit-arrays ;
in: compression.huffman in: compression.huffman
QUALIFIED-WITH: bitstreams bs QUALIFIED-WITH: bitstreams bs ;
<PRIVATE <PRIVATE

View File

@ -4,7 +4,7 @@ USING: accessors arrays assocs byte-vectors combinators
combinators.smart compression.huffman fry hashtables io.binary combinators.smart compression.huffman fry hashtables io.binary
kernel literals locals math math.bitwise math.order math.ranges kernel literals locals math math.bitwise math.order math.ranges
sequences sorting memoize combinators.short-circuit byte-arrays ; sequences sorting memoize combinators.short-circuit byte-arrays ;
QUALIFIED-WITH: bitstreams bs QUALIFIED-WITH: bitstreams bs ;
in: compression.inflate in: compression.inflate
<PRIVATE <PRIVATE

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors combinators io kernel math math.order USING: accessors combinators io kernel math math.order
namespaces sequences vectors ; namespaces sequences vectors ;
QUALIFIED-WITH: bitstreams bs QUALIFIED-WITH: bitstreams bs ;
in: compression.lzw in: compression.lzw
TUPLE: lzw TUPLE: lzw

View File

@ -1,7 +1,7 @@
! Copyright (C) 2009 Doug Coleman. ! Copyright (C) 2009 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors kernel tools.test compression.zlib classes ; USING: accessors kernel tools.test compression.zlib classes ;
QUALIFIED-WITH: compression.zlib.ffi ffi QUALIFIED-WITH: compression.zlib.ffi ffi ;
in: compression.zlib.tests in: compression.zlib.tests
: compress-me ( -- byte-array ) B{ 1 2 3 4 5 } ; : compress-me ( -- byte-array ) B{ 1 2 3 4 5 } ;

View File

@ -6,7 +6,7 @@ images.loader images.normalization io io.binary
io.encodings.8-bit.latin1 io.encodings.string kernel math io.encodings.8-bit.latin1 io.encodings.string kernel math
math.bitwise sequences specialized-arrays summary math.bitwise sequences specialized-arrays summary
io.streams.throwing ; io.streams.throwing ;
QUALIFIED-WITH: bitstreams b QUALIFIED-WITH: bitstreams b ;
SPECIALIZED-ARRAYS: uint ushort ; SPECIALIZED-ARRAYS: uint ushort ;
in: images.bitmap in: images.bitmap

View File

@ -1,7 +1,7 @@
! (c)Joe Groff bsd license ! (c)Joe Groff bsd license
USING: classes.struct math.matrices.simd math.vectors.simd math USING: classes.struct math.matrices.simd math.vectors.simd math
literals math.constants math.functions specialized-arrays tools.test ; literals math.constants math.functions specialized-arrays tools.test ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
FROM: math.matrices => m~ ; FROM: math.matrices => m~ ;
SPECIALIZED-ARRAY: float-4 SPECIALIZED-ARRAY: float-4
in: math.matrices.simd.tests in: math.matrices.simd.tests

View File

@ -6,7 +6,7 @@ sequences.generalizations sequences.private specialized-arrays
typed ; typed ;
FROM: sequences.private => nth-unsafe ; FROM: sequences.private => nth-unsafe ;
FROM: math.quaternions.private => (q*sign) ; FROM: math.quaternions.private => (q*sign) ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: float-4 SPECIALIZED-ARRAY: float-4
in: math.matrices.simd in: math.matrices.simd

View File

@ -4,7 +4,7 @@ grouping kernel libc locals math math.libm math.order math.ranges
sequences sequences.cords sequences.generalizations sequences.private sequences sequences.cords sequences.generalizations sequences.private
sequences.unrolled sequences.unrolled.private specialized-arrays sequences.unrolled sequences.unrolled.private specialized-arrays
vocabs ; vocabs ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: SPECIALIZED-ARRAYS:
c:char c:short c:int c:longlong c:char c:short c:int c:longlong
c:uchar c:ushort c:uint c:ulonglong c:uchar c:ushort c:uint c:ulonglong

View File

@ -8,7 +8,7 @@ specialized-arrays classes.struct eval classes.algebra sets
quotations math.constants compiler.units splitting math.matrices quotations math.constants compiler.units splitting math.matrices
math.vectors.simd.cords alien.data ; math.vectors.simd.cords alien.data ;
FROM: math.vectors.simd.intrinsics => alien-vector set-alien-vector ; FROM: math.vectors.simd.intrinsics => alien-vector set-alien-vector ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:float SPECIALIZED-ARRAY: c:float
in: math.vectors.simd.tests in: math.vectors.simd.tests

View File

@ -5,7 +5,7 @@ math.vectors math.vectors.private math.vectors.simd.intrinsics
namespaces parser prettyprint.custom quotations sequences namespaces parser prettyprint.custom quotations sequences
sequences.generalizations sequences.private vocabs vocabs.loader sequences.generalizations sequences.private vocabs vocabs.loader
words math.bitwise ; words math.bitwise ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: math.vectors.simd in: math.vectors.simd
ERROR: bad-simd-length got expected ; ERROR: bad-simd-length got expected ;

View File

@ -3,7 +3,7 @@
USING: arrays alien.c-types assocs kernel sequences math USING: arrays alien.c-types assocs kernel sequences math
math.functions grouping math.order math.libm math.floats.private math.functions grouping math.order math.libm math.floats.private
fry combinators byte-arrays accessors locals ; fry combinators byte-arrays accessors locals ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: math.vectors in: math.vectors
GENERIC: vneg ( v -- w ) ; GENERIC: vneg ( v -- w ) ;

View File

@ -3,7 +3,7 @@ fry generalizations images kernel locals math math.constants math.functions
math.libm math.matrices.simd math.vectors math.vectors.conversion math.vectors.simd math.libm math.matrices.simd math.vectors math.vectors.conversion math.vectors.simd
memoize random random.mersenne-twister sequences sequences.private specialized-arrays memoize random random.mersenne-twister sequences sequences.private specialized-arrays
typed ; typed ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAYS: c:float c:uchar float-4 uchar-16 ; SPECIALIZED-ARRAYS: c:float c:uchar float-4 uchar-16 ;
in: noise in: noise

View File

@ -6,8 +6,8 @@ hashtables hashtables.private hash-sets hints io.backend
io.binary kernel locals math math.bitwise math.constants io.binary kernel locals math math.bitwise math.constants
math.functions math.order math.ranges namespaces sequences math.functions math.order math.ranges namespaces sequences
sequences.private sets summary system typed vocabs ; sequences.private sets summary system typed vocabs ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
QUALIFIED-WITH: sets sets QUALIFIED-WITH: sets sets ;
in: random in: random
symbol: system-random-generator symbol: system-random-generator

View File

@ -22,7 +22,7 @@ in: tools.completion
{ t } [ { "use:" "" } complete-vocab? ] unit-test { t } [ { "use:" "" } complete-vocab? ] unit-test
{ f } [ { "use:" } complete-vocab? ] unit-test { f } [ { "use:" } complete-vocab? ] unit-test
{ t } [ { "unuse:" "A" } complete-vocab? ] unit-test { t } [ { "unuse:" "A" } complete-vocab? ] unit-test
{ t } [ { "QUALIFIED:" "A" } complete-vocab? ] unit-test { t } [ { "qualified:" "A" } complete-vocab? ] unit-test
{ t } [ { "QUALIFIED-WITH:" "A" } complete-vocab? ] unit-test { t } [ { "QUALIFIED-WITH:" "A" } complete-vocab? ] unit-test
{ t } [ { "USING:" "A" "B" "C" } complete-vocab? ] unit-test { t } [ { "USING:" "A" "B" "C" } complete-vocab? ] unit-test
{ f } [ { "USING:" "A" "B" "C" ";" } complete-vocab? ] unit-test { f } [ { "USING:" "A" "B" "C" ";" } complete-vocab? ] unit-test

View File

@ -114,7 +114,7 @@ PRIVATE>
<PRIVATE <PRIVATE
: (complete-single-vocab?) ( str -- ? ) : (complete-single-vocab?) ( str -- ? )
{ "in:" "use:" "unuse:" "QUALIFIED:" "QUALIFIED-WITH:" } { "in:" "use:" "unuse:" "qualified:" "QUALIFIED-WITH:" }
member? ; inline member? ; inline
: complete-single-vocab? ( tokens -- ? ) : complete-single-vocab? ( tokens -- ? )

View File

@ -7,7 +7,7 @@ tools.deploy.config.editor assocs hashtables prettyprint
io.backend.unix cocoa io.encodings.utf8 io.backend io.backend.unix cocoa io.encodings.utf8 io.backend
cocoa.application cocoa.classes cocoa.plists cocoa.application cocoa.classes cocoa.plists
combinators vocabs.metadata vocabs.loader ; combinators vocabs.metadata vocabs.loader ;
QUALIFIED-WITH: tools.deploy.unix unix QUALIFIED-WITH: tools.deploy.unix unix ;
in: tools.deploy.macosx in: tools.deploy.macosx
: bundle-dir ( -- dir ) : bundle-dir ( -- dir )

View File

@ -6,7 +6,7 @@ USING: accessors arrays byte-arrays fry kernel layouts math
math.bitwise math.order sequences sets slots.syntax math.bitwise math.order sequences sets slots.syntax
tools.image-analyzer.relocations ; tools.image-analyzer.relocations ;
in: tools.image-analyzer.references in: tools.image-analyzer.references
QUALIFIED-WITH: tools.image-analyzer.vm vm QUALIFIED-WITH: tools.image-analyzer.vm vm ;
! Edges in the heap ! Edges in the heap
GENERIC: pointers ( heap heap-node struct -- seq ) ; GENERIC: pointers ( heap heap-node struct -- seq ) ;

View File

@ -6,7 +6,7 @@ assocs byte-arrays classes.struct continuations fry grouping
kernel libc literals math sequences splitting strings system kernel libc literals math sequences splitting strings system
system-info.macosx tools.ps unix unix.time unix.types ; system-info.macosx tools.ps unix unix.time unix.types ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
in: tools.ps.macosx in: tools.ps.macosx

View File

@ -52,8 +52,8 @@ fry
adsoda adsoda
adsoda.tools adsoda.tools
; ;
QUALIFIED-WITH: ui.pens.solid s QUALIFIED-WITH: ui.pens.solid s ;
QUALIFIED-WITH: ui.gadgets.wrappers w QUALIFIED-WITH: ui.gadgets.wrappers w ;
in: 4DNav in: 4DNav

View File

@ -8,7 +8,7 @@ kernel locals math math.bitwise math.blas.matrices
math.blas.vectors math.constants math.functions math.matrices math.blas.vectors math.constants math.functions math.matrices
math.order math.vectors memoize namespaces sequences math.order math.vectors memoize namespaces sequences
sequences.deep ; sequences.deep ;
QUALIFIED-WITH: bitstreams bs QUALIFIED-WITH: bitstreams bs ;
in: images.jpeg in: images.jpeg
singleton: jpeg-image singleton: jpeg-image

View File

@ -4,7 +4,7 @@ USING: accessors alien alien.data arrays assocs compiler.units
effects io.backend io.pathnames kernel llvm.core llvm.jit effects io.backend io.pathnames kernel llvm.core llvm.jit
llvm.reader llvm.types make namespaces sequences llvm.reader llvm.types make namespaces sequences
specialized-arrays vocabs words ; specialized-arrays vocabs words ;
QUALIFIED-WITH: alien.c-types c QUALIFIED-WITH: alien.c-types c ;
SPECIALIZED-ARRAY: c:void* SPECIALIZED-ARRAY: c:void*
in: llvm.invoker in: llvm.invoker

View File

@ -1,7 +1,7 @@
USING: accessors arrays kernel math.rectangles sequences USING: accessors arrays kernel math.rectangles sequences
ui.gadgets.controls models.combinators ui.gadgets ui.gadgets.glass ui.gadgets.controls models.combinators ui.gadgets ui.gadgets.glass
ui.gadgets.labels ui.gestures ; ui.gadgets.labels ui.gestures ;
QUALIFIED-WITH: ui.gadgets.tables tbl QUALIFIED-WITH: ui.gadgets.tables tbl ;
in: ui.gadgets.comboboxes in: ui.gadgets.comboboxes
TUPLE: combo-table < table spawner ; TUPLE: combo-table < table spawner ;

View File

@ -3,8 +3,8 @@ models.combinators ui.gadgets ui.gadgets.borders ui.gadgets.buttons
ui.gadgets.buttons.private ui.gadgets.editors ui.gadgets.editors.private ui.gadgets.buttons.private ui.gadgets.editors ui.gadgets.editors.private
words images.loader ui.gadgets.scrollers ui.images vocabs.parser lexer words images.loader ui.gadgets.scrollers ui.images vocabs.parser lexer
models.range ui.gadgets.sliders ; models.range ui.gadgets.sliders ;
QUALIFIED-WITH: ui.gadgets.sliders slider QUALIFIED-WITH: ui.gadgets.sliders slider ;
QUALIFIED-WITH: ui.gadgets.tables tbl QUALIFIED-WITH: ui.gadgets.tables tbl ;
EXCLUDE: ui.gadgets.editors => model-field ; EXCLUDE: ui.gadgets.editors => model-field ;
in: ui.gadgets.controls in: ui.gadgets.controls

View File

@ -3,7 +3,7 @@ models monads namespaces parser sequences
sequences.extras models.combinators ui.gadgets sequences.extras models.combinators ui.gadgets
ui.gadgets.tracks words ui.gadgets.controls ; ui.gadgets.tracks words ui.gadgets.controls ;
QUALIFIED: make QUALIFIED: make
QUALIFIED-WITH: ui.gadgets.books book QUALIFIED-WITH: ui.gadgets.books book ;
in: ui.gadgets.layout in: ui.gadgets.layout
symbol: templates symbol: templates