Fixing some stack comments
parent
1559b74640
commit
38c6be94d4
|
@ -3,7 +3,7 @@
|
||||||
USING: namespaces make math math.order math.parser sequences accessors
|
USING: namespaces make math math.order math.parser sequences accessors
|
||||||
kernel kernel.private layouts assocs words summary arrays
|
kernel kernel.private layouts assocs words summary arrays
|
||||||
combinators classes.algebra alien alien.c-types alien.structs
|
combinators classes.algebra alien alien.c-types alien.structs
|
||||||
alien.strings alien.arrays alien.complex sets libc
|
alien.strings alien.arrays alien.complex sets libc call
|
||||||
continuations.private fry cpu.architecture
|
continuations.private fry cpu.architecture
|
||||||
compiler.errors
|
compiler.errors
|
||||||
compiler.alien
|
compiler.alien
|
||||||
|
@ -464,7 +464,7 @@ TUPLE: callback-context ;
|
||||||
dup current-callback eq? [
|
dup current-callback eq? [
|
||||||
drop
|
drop
|
||||||
] [
|
] [
|
||||||
yield-hook get call wait-to-return
|
yield-hook get call( -- ) wait-to-return
|
||||||
] if ;
|
] if ;
|
||||||
|
|
||||||
: do-callback ( quot token -- )
|
: do-callback ( quot token -- )
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008, 2009 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: io.encodings io.backend io.ports io.streams.duplex
|
USING: io.encodings io.backend io.ports io.streams.duplex
|
||||||
io splitting grouping sequences namespaces kernel
|
io splitting grouping sequences namespaces kernel
|
||||||
destructors math concurrency.combinators accessors
|
destructors math concurrency.combinators accessors call fry
|
||||||
arrays continuations quotations system vocabs.loader combinators ;
|
arrays continuations quotations system vocabs.loader combinators ;
|
||||||
IN: io.pipes
|
IN: io.pipes
|
||||||
|
|
||||||
|
@ -29,11 +29,12 @@ HOOK: (pipe) io-backend ( -- pipe )
|
||||||
: ?writer ( handle/f -- stream )
|
: ?writer ( handle/f -- stream )
|
||||||
[ <output-port> &dispose ] [ output-stream get ] if* ;
|
[ <output-port> &dispose ] [ output-stream get ] if* ;
|
||||||
|
|
||||||
GENERIC: run-pipeline-element ( input-fd output-fd obj -- quot )
|
GENERIC: run-pipeline-element ( input-fd output-fd obj -- result )
|
||||||
|
|
||||||
M: callable run-pipeline-element
|
M: callable run-pipeline-element
|
||||||
[
|
[
|
||||||
[ [ ?reader ] [ ?writer ] bi* ] dip with-streams*
|
[ [ ?reader ] [ ?writer ] bi* ] dip
|
||||||
|
'[ _ call( -- result ) ] with-streams*
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
: <pipes> ( n -- pipes )
|
: <pipes> ( n -- pipes )
|
||||||
|
|
|
@ -30,7 +30,7 @@ ERROR: duplicate-slot-names names ;
|
||||||
|
|
||||||
ERROR: invalid-slot-name name ;
|
ERROR: invalid-slot-name name ;
|
||||||
|
|
||||||
: parse-long-slot-name ( -- )
|
: parse-long-slot-name ( -- spec )
|
||||||
[ scan , \ } parse-until % ] { } make ;
|
[ scan , \ } parse-until % ] { } make ;
|
||||||
|
|
||||||
: parse-slot-name ( string/f -- ? )
|
: parse-slot-name ( string/f -- ? )
|
||||||
|
@ -64,7 +64,7 @@ ERROR: bad-literal-tuple ;
|
||||||
|
|
||||||
: parse-slot-value ( -- )
|
: parse-slot-value ( -- )
|
||||||
scan scan-object 2array , scan {
|
scan scan-object 2array , scan {
|
||||||
{ f [ unexpected-eof ] }
|
{ f [ \ } unexpected-eof ] }
|
||||||
{ "}" [ ] }
|
{ "}" [ ] }
|
||||||
[ bad-literal-tuple ]
|
[ bad-literal-tuple ]
|
||||||
} case ;
|
} case ;
|
||||||
|
@ -72,13 +72,13 @@ ERROR: bad-literal-tuple ;
|
||||||
: (parse-slot-values) ( -- )
|
: (parse-slot-values) ( -- )
|
||||||
parse-slot-value
|
parse-slot-value
|
||||||
scan {
|
scan {
|
||||||
{ f [ unexpected-eof ] }
|
{ f [ \ } unexpected-eof ] }
|
||||||
{ "{" [ (parse-slot-values) ] }
|
{ "{" [ (parse-slot-values) ] }
|
||||||
{ "}" [ ] }
|
{ "}" [ ] }
|
||||||
[ bad-literal-tuple ]
|
[ bad-literal-tuple ]
|
||||||
} case ;
|
} case ;
|
||||||
|
|
||||||
: parse-slot-values ( -- )
|
: parse-slot-values ( -- values )
|
||||||
[ (parse-slot-values) ] { } make ;
|
[ (parse-slot-values) ] { } make ;
|
||||||
|
|
||||||
: boa>tuple ( class slots -- tuple )
|
: boa>tuple ( class slots -- tuple )
|
||||||
|
|
|
@ -18,6 +18,6 @@ SYMBOL: current-method
|
||||||
: with-method-definition ( method quot -- )
|
: with-method-definition ( method quot -- )
|
||||||
over current-method set call current-method off ; inline
|
over current-method set call current-method off ; inline
|
||||||
|
|
||||||
: (M:) ( method def -- )
|
: (M:) ( -- method def )
|
||||||
CREATE-METHOD [ parse-definition ] with-method-definition ;
|
CREATE-METHOD [ parse-definition ] with-method-definition ;
|
||||||
|
|
||||||
|
|
|
@ -214,7 +214,7 @@ print-use-hook [ [ ] ] initialize
|
||||||
[
|
[
|
||||||
V{ } clone amended-use set
|
V{ } clone amended-use set
|
||||||
parse-lines
|
parse-lines
|
||||||
amended-use get empty? [ print-use-hook get call ] unless
|
amended-use get empty? [ print-use-hook get assert-depth ] unless
|
||||||
] with-file-vocabs ;
|
] with-file-vocabs ;
|
||||||
|
|
||||||
: parsing-file ( file -- )
|
: parsing-file ( file -- )
|
||||||
|
|
Loading…
Reference in New Issue