Fixing unit tests
parent
fd8136786b
commit
40e926609a
|
@ -39,7 +39,7 @@ IN: compiler.tree.builder
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: check-cannot-infer ( word -- )
|
: check-cannot-infer ( word -- )
|
||||||
dup +cannot-infer+ word-prop [ cannot-infer-effect ] [ drop ] if ;
|
dup "cannot-infer" word-prop [ cannot-infer-effect ] [ drop ] if ;
|
||||||
|
|
||||||
: check-no-compile ( word -- )
|
: check-no-compile ( word -- )
|
||||||
dup "no-compile" word-prop [ cannot-infer-effect ] [ drop ] if ;
|
dup "no-compile" word-prop [ cannot-infer-effect ] [ drop ] if ;
|
||||||
|
|
|
@ -24,6 +24,11 @@ IN: compiler.tree.def-use.tests
|
||||||
compute-def-use
|
compute-def-use
|
||||||
check-nodes ;
|
check-nodes ;
|
||||||
|
|
||||||
|
: too-deep ( a b -- c )
|
||||||
|
dup [ drop ] [ 2dup too-deep too-deep drop ] if ; inline recursive
|
||||||
|
|
||||||
|
[ ] [ [ too-deep ] build-tree normalize compute-def-use check-nodes ] unit-test
|
||||||
|
|
||||||
! compute-def-use checks for SSA violations, so we use that to
|
! compute-def-use checks for SSA violations, so we use that to
|
||||||
! ensure we generate some common patterns correctly.
|
! ensure we generate some common patterns correctly.
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ SYMBOL: rename-map
|
||||||
[ rename-map get at ] keep or ;
|
[ rename-map get at ] keep or ;
|
||||||
|
|
||||||
: rename-values ( values -- values' )
|
: rename-values ( values -- values' )
|
||||||
[ rename-value ] map ;
|
rename-map get '[ [ , at ] keep or ] map ;
|
||||||
|
|
||||||
GENERIC: rename-node-values* ( node -- node )
|
GENERIC: rename-node-values* ( node -- node )
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ SYMBOL: introduction-stack
|
||||||
introduction-stack [ swap cut* swap ] change ;
|
introduction-stack [ swap cut* swap ] change ;
|
||||||
|
|
||||||
: add-renamings ( old new -- )
|
: add-renamings ( old new -- )
|
||||||
|
[ rename-values ] dip
|
||||||
rename-map get '[ , set-at ] 2each ;
|
rename-map get '[ , set-at ] 2each ;
|
||||||
|
|
||||||
M: #introduce normalize*
|
M: #introduce normalize*
|
||||||
|
|
|
@ -560,6 +560,11 @@ M: integer infinite-loop infinite-loop ;
|
||||||
|
|
||||||
[ ] [ [ 0 fold-throw-test ] final-info drop ] unit-test
|
[ ] [ [ 0 fold-throw-test ] final-info drop ] unit-test
|
||||||
|
|
||||||
|
: too-deep ( a b -- c )
|
||||||
|
dup [ drop ] [ 2dup too-deep too-deep * ] if ; inline recursive
|
||||||
|
|
||||||
|
[ ] [ [ too-deep ] final-info drop ] unit-test
|
||||||
|
|
||||||
! [ V{ string } ] [
|
! [ V{ string } ] [
|
||||||
! [ dup string? t xor [ "A" throw ] [ ] if ] final-classes
|
! [ dup string? t xor [ "A" throw ] [ ] if ] final-classes
|
||||||
! ] unit-test
|
! ] unit-test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
IN: hints
|
IN: hints
|
||||||
USING: help.markup help.syntax words ;
|
USING: help.markup help.syntax words quotations sequences ;
|
||||||
|
|
||||||
ARTICLE: "hints" "Compiler specialization hints"
|
ARTICLE: "hints" "Compiler specialization hints"
|
||||||
"Specialization hints help the compiler generate efficient code."
|
"Specialization hints help the compiler generate efficient code."
|
||||||
|
@ -11,7 +11,7 @@ $nl
|
||||||
"In some cases, specialization will not help at all, and can make generated code slower from the increase in code size. The compiler is capable of inferring enough static type information to generate efficient code in many cases without explicit help from the programmer. Specializers should be used as a last resort, after profiling shows that a critical loop makes a lot of repeated calls to generic words which dispatch on the same class."
|
"In some cases, specialization will not help at all, and can make generated code slower from the increase in code size. The compiler is capable of inferring enough static type information to generate efficient code in many cases without explicit help from the programmer. Specializers should be used as a last resort, after profiling shows that a critical loop makes a lot of repeated calls to generic words which dispatch on the same class."
|
||||||
$nl
|
$nl
|
||||||
"Type hints are declared with a parsing word:"
|
"Type hints are declared with a parsing word:"
|
||||||
{ $subsection POSTPONE: HINT: }
|
{ $subsection POSTPONE: HINTS: }
|
||||||
$nl
|
$nl
|
||||||
"The specialized version of a word which will be compiled by the compiler can be inspected:"
|
"The specialized version of a word which will be compiled by the compiler can be inspected:"
|
||||||
{ $subsection specialized-def } ;
|
{ $subsection specialized-def } ;
|
||||||
|
|
|
@ -53,14 +53,14 @@ SYMBOL: 8-bit-encodings
|
||||||
TUPLE: 8-bit decode encode ;
|
TUPLE: 8-bit decode encode ;
|
||||||
|
|
||||||
: encode-8-bit ( char stream assoc -- )
|
: encode-8-bit ( char stream assoc -- )
|
||||||
swap >r at*
|
swapd at*
|
||||||
[ r> stream-write1 ] [ r> drop encode-error ] if ; inline
|
[ swap stream-write1 ] [ nip encode-error ] if ; inline
|
||||||
|
|
||||||
M: 8-bit encode-char encode>> encode-8-bit ;
|
M: 8-bit encode-char encode>> encode-8-bit ;
|
||||||
|
|
||||||
: decode-8-bit ( stream array -- char/f )
|
: decode-8-bit ( stream array -- char/f )
|
||||||
>r stream-read1 dup
|
swap stream-read1 dup
|
||||||
[ r> nth [ replacement-char ] unless* ] [ r> 2drop f ] if ; inline
|
[ swap nth [ replacement-char ] unless* ] [ 2drop f ] if ; inline
|
||||||
|
|
||||||
M: 8-bit decode-char decode>> decode-8-bit ;
|
M: 8-bit decode-char decode>> decode-8-bit ;
|
||||||
|
|
||||||
|
|
|
@ -9,15 +9,9 @@ stack-checker.visitor stack-checker.errors ;
|
||||||
IN: stack-checker.backend
|
IN: stack-checker.backend
|
||||||
|
|
||||||
! Word properties we use
|
! Word properties we use
|
||||||
SYMBOL: +inferred-effect+
|
|
||||||
SYMBOL: +cannot-infer+
|
|
||||||
SYMBOL: +special+
|
|
||||||
SYMBOL: +shuffle+
|
|
||||||
SYMBOL: +infer+
|
|
||||||
|
|
||||||
SYMBOL: visited
|
SYMBOL: visited
|
||||||
|
|
||||||
: reset-on-redefine { +inferred-effect+ +cannot-infer+ } ; inline
|
: reset-on-redefine { "inferred-effect" "cannot-infer" } ; inline
|
||||||
|
|
||||||
: (redefined) ( word -- )
|
: (redefined) ( word -- )
|
||||||
dup visited get key? [ drop ] [
|
dup visited get key? [ drop ] [
|
||||||
|
@ -122,7 +116,7 @@ M: object apply-object push-literal ;
|
||||||
consume-r dup copy-values [ #r>, ] [ nip output-d ] 2bi ;
|
consume-r dup copy-values [ #r>, ] [ nip output-d ] 2bi ;
|
||||||
|
|
||||||
: undo-infer ( -- )
|
: undo-infer ( -- )
|
||||||
recorded get [ f +inferred-effect+ set-word-prop ] each ;
|
recorded get [ f "inferred-effect" set-word-prop ] each ;
|
||||||
|
|
||||||
: consume/produce ( effect quot -- )
|
: consume/produce ( effect quot -- )
|
||||||
#! quot is ( inputs outputs -- )
|
#! quot is ( inputs outputs -- )
|
||||||
|
@ -168,11 +162,11 @@ M: object apply-object push-literal ;
|
||||||
current-effect
|
current-effect
|
||||||
[ check-effect ]
|
[ check-effect ]
|
||||||
[ drop recorded get push ]
|
[ drop recorded get push ]
|
||||||
[ +inferred-effect+ set-word-prop ]
|
[ "inferred-effect" set-word-prop ]
|
||||||
2tri ;
|
2tri ;
|
||||||
|
|
||||||
: maybe-cannot-infer ( word quot -- )
|
: maybe-cannot-infer ( word quot -- )
|
||||||
[ ] [ t +cannot-infer+ set-word-prop ] cleanup ; inline
|
[ ] [ t "cannot-infer" set-word-prop ] cleanup ; inline
|
||||||
|
|
||||||
: infer-word ( word -- effect )
|
: infer-word ( word -- effect )
|
||||||
[
|
[
|
||||||
|
@ -197,7 +191,7 @@ M: object apply-object push-literal ;
|
||||||
dup required-stack-effect apply-word/effect ;
|
dup required-stack-effect apply-word/effect ;
|
||||||
|
|
||||||
: cached-infer ( word -- )
|
: cached-infer ( word -- )
|
||||||
dup +inferred-effect+ word-prop apply-word/effect ;
|
dup "inferred-effect" word-prop apply-word/effect ;
|
||||||
|
|
||||||
: with-infer ( quot -- effect visitor )
|
: with-infer ( quot -- effect visitor )
|
||||||
[
|
[
|
||||||
|
|
|
@ -43,7 +43,7 @@ IN: stack-checker.known-words
|
||||||
{ over (( x y -- x y x )) }
|
{ over (( x y -- x y x )) }
|
||||||
{ pick (( x y z -- x y z x )) }
|
{ pick (( x y z -- x y z x )) }
|
||||||
{ swap (( x y -- y x )) }
|
{ swap (( x y -- y x )) }
|
||||||
} [ +shuffle+ set-word-prop ] assoc-each
|
} [ "shuffle" set-word-prop ] assoc-each
|
||||||
|
|
||||||
: infer-shuffle ( shuffle -- )
|
: infer-shuffle ( shuffle -- )
|
||||||
[ in>> length consume-d ] keep ! inputs shuffle
|
[ in>> length consume-d ] keep ! inputs shuffle
|
||||||
|
@ -52,7 +52,7 @@ IN: stack-checker.known-words
|
||||||
#shuffle, ;
|
#shuffle, ;
|
||||||
|
|
||||||
: infer-shuffle-word ( word -- )
|
: infer-shuffle-word ( word -- )
|
||||||
+shuffle+ word-prop infer-shuffle ;
|
"shuffle" word-prop infer-shuffle ;
|
||||||
|
|
||||||
: infer-declare ( -- )
|
: infer-declare ( -- )
|
||||||
pop-literal nip
|
pop-literal nip
|
||||||
|
@ -166,7 +166,7 @@ M: object infer-call*
|
||||||
>r r> declare call curry compose execute if dispatch
|
>r r> declare call curry compose execute if dispatch
|
||||||
<tuple-boa> (throw) load-locals get-local drop-locals
|
<tuple-boa> (throw) load-locals get-local drop-locals
|
||||||
do-primitive alien-invoke alien-indirect alien-callback
|
do-primitive alien-invoke alien-indirect alien-callback
|
||||||
} [ t +special+ set-word-prop ] each
|
} [ t "special" set-word-prop ] each
|
||||||
|
|
||||||
{ call execute dispatch load-locals get-local drop-locals }
|
{ call execute dispatch load-locals get-local drop-locals }
|
||||||
[ t "no-compile" set-word-prop ] each
|
[ t "no-compile" set-word-prop ] each
|
||||||
|
@ -176,13 +176,13 @@ SYMBOL: +primitive+
|
||||||
: non-inline-word ( word -- )
|
: non-inline-word ( word -- )
|
||||||
dup +called+ depends-on
|
dup +called+ depends-on
|
||||||
{
|
{
|
||||||
{ [ dup +shuffle+ word-prop ] [ infer-shuffle-word ] }
|
{ [ dup "shuffle" word-prop ] [ infer-shuffle-word ] }
|
||||||
{ [ dup +special+ word-prop ] [ infer-special ] }
|
{ [ dup "special" word-prop ] [ infer-special ] }
|
||||||
{ [ dup +primitive+ word-prop ] [ infer-primitive ] }
|
{ [ dup +primitive+ word-prop ] [ infer-primitive ] }
|
||||||
{ [ dup +transform-quot+ word-prop ] [ apply-transform ] }
|
{ [ dup +transform-quot+ word-prop ] [ apply-transform ] }
|
||||||
{ [ dup "macro" word-prop ] [ apply-macro ] }
|
{ [ dup "macro" word-prop ] [ apply-macro ] }
|
||||||
{ [ dup +cannot-infer+ word-prop ] [ cannot-infer-effect ] }
|
{ [ dup "cannot-infer" word-prop ] [ cannot-infer-effect ] }
|
||||||
{ [ dup +inferred-effect+ word-prop ] [ cached-infer ] }
|
{ [ dup "inferred-effect" word-prop ] [ cached-infer ] }
|
||||||
{ [ dup recursive-label ] [ call-recursive-word ] }
|
{ [ dup recursive-label ] [ call-recursive-word ] }
|
||||||
[ dup infer-word apply-word/effect ]
|
[ dup infer-word apply-word/effect ]
|
||||||
} cond ;
|
} cond ;
|
||||||
|
@ -598,7 +598,7 @@ SYMBOL: +primitive+
|
||||||
|
|
||||||
\ (set-os-envs) { array } { } define-primitive
|
\ (set-os-envs) { array } { } define-primitive
|
||||||
|
|
||||||
\ do-primitive [ \ do-primitive cannot-infer-effect ] +infer+ set-word-prop
|
\ do-primitive [ \ do-primitive cannot-infer-effect ] "infer" set-word-prop
|
||||||
|
|
||||||
\ dll-valid? { object } { object } define-primitive
|
\ dll-valid? { object } { object } define-primitive
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,10 @@ M: callable infer ( quot -- effect )
|
||||||
|
|
||||||
: forget-errors ( -- )
|
: forget-errors ( -- )
|
||||||
all-words [
|
all-words [
|
||||||
dup subwords [ f +cannot-infer+ set-word-prop ] each
|
dup subwords [ f "cannot-infer" set-word-prop ] each
|
||||||
f +cannot-infer+ set-word-prop
|
f "cannot-infer" set-word-prop
|
||||||
] each ;
|
] each ;
|
||||||
|
|
||||||
: forget-effects ( -- )
|
: forget-effects ( -- )
|
||||||
forget-errors
|
forget-errors
|
||||||
all-words [ f +inferred-effect+ set-word-prop ] each ;
|
all-words [ f "inferred-effect" set-word-prop ] each ;
|
||||||
|
|
|
@ -3,7 +3,7 @@ kernel math namespaces parser prettyprint sequences strings
|
||||||
tools.test vectors words quotations classes classes.algebra
|
tools.test vectors words quotations classes classes.algebra
|
||||||
classes.private classes.union classes.mixin classes.predicate
|
classes.private classes.union classes.mixin classes.predicate
|
||||||
vectors definitions source-files compiler.units growable
|
vectors definitions source-files compiler.units growable
|
||||||
random inference effects kernel.private sbufs math.order
|
random stack-checker effects kernel.private sbufs math.order
|
||||||
classes.tuple ;
|
classes.tuple ;
|
||||||
IN: classes.algebra.tests
|
IN: classes.algebra.tests
|
||||||
|
|
||||||
|
|
|
@ -91,10 +91,7 @@ M: ratio big-generic-test "ratio" ;
|
||||||
M: string big-generic-test "string" ;
|
M: string big-generic-test "string" ;
|
||||||
M: shit big-generic-test "shit" ;
|
M: shit big-generic-test "shit" ;
|
||||||
|
|
||||||
TUPLE: delegating ;
|
|
||||||
|
|
||||||
[ T{ shit f } "shit" ] [ T{ shit f } big-generic-test ] unit-test
|
[ T{ shit f } "shit" ] [ T{ shit f } big-generic-test ] unit-test
|
||||||
[ T{ shit f } "shit" ] [ T{ delegating T{ shit f } } big-generic-test ] unit-test
|
|
||||||
|
|
||||||
[ t ] [ \ + math-generic? ] unit-test
|
[ t ] [ \ + math-generic? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ IN: generic.standard.tests
|
||||||
USING: tools.test math math.functions math.constants
|
USING: tools.test math math.functions math.constants
|
||||||
generic.standard strings sequences arrays kernel accessors
|
generic.standard strings sequences arrays kernel accessors
|
||||||
words float-arrays byte-arrays bit-arrays parser namespaces
|
words float-arrays byte-arrays bit-arrays parser namespaces
|
||||||
quotations inference vectors growable hashtables sbufs
|
quotations stack-checker vectors growable hashtables sbufs
|
||||||
prettyprint byte-vectors bit-vectors float-vectors definitions
|
prettyprint byte-vectors bit-vectors float-vectors definitions
|
||||||
generic sets graphs assocs ;
|
generic sets graphs assocs ;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: io.files.tests
|
IN: io.files.tests
|
||||||
USING: tools.test io.files io.files.private io threads kernel
|
USING: tools.test io.files io.files.private io threads kernel
|
||||||
continuations io.encodings.ascii io.files.unique sequences
|
continuations io.encodings.ascii sequences
|
||||||
strings accessors io.encodings.utf8 math destructors
|
strings accessors io.encodings.utf8 math destructors
|
||||||
namespaces ;
|
namespaces ;
|
||||||
|
|
||||||
|
@ -126,6 +126,8 @@ namespaces ;
|
||||||
|
|
||||||
[ f ] [ "test-blah" temp-file exists? ] unit-test
|
[ f ] [ "test-blah" temp-file exists? ] unit-test
|
||||||
|
|
||||||
|
USE: debugger.threads
|
||||||
|
|
||||||
[ ] [ "test-quux.txt" temp-file ascii [ [ yield "Hi" write ] "Test" spawn drop ] with-file-writer ] unit-test
|
[ ] [ "test-quux.txt" temp-file ascii [ [ yield "Hi" write ] "Test" spawn drop ] with-file-writer ] unit-test
|
||||||
|
|
||||||
[ ] [ "test-quux.txt" temp-file delete-file ] unit-test
|
[ ] [ "test-quux.txt" temp-file delete-file ] unit-test
|
||||||
|
@ -133,6 +135,7 @@ namespaces ;
|
||||||
[ ] [ "test-quux.txt" temp-file ascii [ [ yield "Hi" write ] "Test" spawn drop ] with-file-writer ] unit-test
|
[ ] [ "test-quux.txt" temp-file ascii [ [ yield "Hi" write ] "Test" spawn drop ] with-file-writer ] unit-test
|
||||||
|
|
||||||
[ ] [ "test-quux.txt" "quux-test.txt" [ temp-file ] bi@ move-file ] unit-test
|
[ ] [ "test-quux.txt" "quux-test.txt" [ temp-file ] bi@ move-file ] unit-test
|
||||||
|
|
||||||
[ t ] [ "quux-test.txt" temp-file exists? ] unit-test
|
[ t ] [ "quux-test.txt" temp-file exists? ] unit-test
|
||||||
|
|
||||||
[ ] [ "quux-test.txt" temp-file delete-file ] unit-test
|
[ ] [ "quux-test.txt" temp-file delete-file ] unit-test
|
||||||
|
@ -221,18 +224,6 @@ namespaces ;
|
||||||
|
|
||||||
[ ] [ "append-test" temp-file ascii <file-appender> dispose ] unit-test
|
[ ] [ "append-test" temp-file ascii <file-appender> dispose ] unit-test
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[ 123 ] [
|
|
||||||
"core" ".test" [
|
|
||||||
[
|
|
||||||
ascii [
|
|
||||||
123 CHAR: a <repetition> >string write
|
|
||||||
] with-file-writer
|
|
||||||
] keep file-info size>>
|
|
||||||
] with-unique-file
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
[ "/usr/lib" ] [ "/usr" "lib" append-path ] unit-test
|
[ "/usr/lib" ] [ "/usr" "lib" append-path ] unit-test
|
||||||
[ "/usr/lib" ] [ "/usr/" "lib" append-path ] unit-test
|
[ "/usr/lib" ] [ "/usr/" "lib" append-path ] unit-test
|
||||||
[ "/usr/lib" ] [ "/usr" "./lib" append-path ] unit-test
|
[ "/usr/lib" ] [ "/usr" "./lib" append-path ] unit-test
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
! Daniel Ehrenberg.
|
! Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: kernel combinators fry namespaces quotations hashtables
|
USING: kernel combinators fry namespaces quotations hashtables
|
||||||
sequences assocs arrays inference effects math math.ranges
|
sequences assocs arrays stack-checker effects math math.ranges
|
||||||
generalizations macros continuations random locals ;
|
generalizations macros continuations random locals ;
|
||||||
|
|
||||||
IN: combinators.lib
|
IN: combinators.lib
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
! Copyright (C) 2007, 2008 Daniel Ehrenberg.
|
! Copyright (C) 2007, 2008 Daniel Ehrenberg.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors kernel words summary slots quotations
|
USING: accessors kernel words summary slots quotations
|
||||||
sequences assocs math arrays inference effects generalizations
|
sequences assocs math arrays stack-checker effects generalizations
|
||||||
continuations debugger classes.tuple namespaces vectors
|
continuations debugger classes.tuple namespaces vectors
|
||||||
bit-arrays byte-arrays strings sbufs math.functions macros
|
bit-arrays byte-arrays strings sbufs math.functions macros
|
||||||
sequences.private combinators mirrors
|
sequences.private combinators mirrors
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
IN: io.files.unique.tests
|
||||||
|
|
||||||
|
[ 123 ] [
|
||||||
|
"core" ".test" [
|
||||||
|
[
|
||||||
|
ascii [
|
||||||
|
123 CHAR: a <repetition> >string write
|
||||||
|
] with-file-writer
|
||||||
|
] keep file-info size>>
|
||||||
|
] with-unique-file
|
||||||
|
] unit-test
|
|
@ -48,18 +48,6 @@ if ;
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
USE: inference.transforms
|
|
||||||
|
|
||||||
! : narray ( n -- array ) [ drop ] map reverse ;
|
|
||||||
|
|
||||||
: [narray] ( n -- quot ) [ [ drop ] map reverse ] curry ;
|
|
||||||
|
|
||||||
: narray ( n -- array ) [narray] call ;
|
|
||||||
|
|
||||||
\ narray [ [narray] ] 1 define-transform
|
|
||||||
|
|
||||||
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
||||||
|
|
||||||
: new ( class -- object )
|
: new ( class -- object )
|
||||||
get dup >r class-slots length narray r> swap 2array ;
|
get dup >r class-slots length narray r> swap 2array ;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: alien alien.c-types arrays assocs byte-arrays inference
|
USING: alien alien.c-types arrays assocs byte-arrays io
|
||||||
inference.transforms io io.binary io.streams.string kernel math
|
io.binary io.streams.string kernel math math.parser namespaces
|
||||||
math.parser namespaces parser prettyprint quotations sequences
|
parser prettyprint quotations sequences strings vectors words
|
||||||
strings vectors words macros math.functions math.bitfields.lib ;
|
macros math.functions math.bitfields.lib ;
|
||||||
IN: pack
|
IN: pack
|
||||||
|
|
||||||
SYMBOL: big-endian
|
SYMBOL: big-endian
|
||||||
|
|
|
@ -4,8 +4,8 @@ USING: kernel compiler.units words arrays strings math.parser sequences
|
||||||
quotations vectors namespaces math assocs continuations peg
|
quotations vectors namespaces math assocs continuations peg
|
||||||
peg.parsers unicode.categories multiline combinators.lib
|
peg.parsers unicode.categories multiline combinators.lib
|
||||||
splitting accessors effects sequences.deep peg.search
|
splitting accessors effects sequences.deep peg.search
|
||||||
combinators.short-circuit lexer io.streams.string inference io
|
combinators.short-circuit lexer io.streams.string
|
||||||
prettyprint combinators parser ;
|
stack-checker io prettyprint combinators parser ;
|
||||||
IN: peg.ebnf
|
IN: peg.ebnf
|
||||||
|
|
||||||
: rule ( name word -- parser )
|
: rule ( name word -- parser )
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
! Updated by Chris Double, September 2006
|
! Updated by Chris Double, September 2006
|
||||||
|
|
||||||
USING: arrays kernel sequences math vectors arrays namespaces
|
USING: arrays kernel sequences math vectors arrays namespaces
|
||||||
quotations parser effects inference words ;
|
quotations parser effects stack-checker words ;
|
||||||
IN: promises
|
IN: promises
|
||||||
|
|
||||||
TUPLE: promise quot forced? value ;
|
TUPLE: promise quot forced? value ;
|
||||||
|
|
Loading…
Reference in New Issue