]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing some stack comments
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 16 Mar 2009 11:17:18 +0000 (06:17 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 16 Mar 2009 11:17:18 +0000 (06:17 -0500)
basis/compiler/codegen/codegen.factor
basis/io/pipes/pipes.factor
core/classes/tuple/parser/parser.factor
core/generic/parser/parser.factor
core/parser/parser.factor

index d915b29ae56834b020c246983bb6b8831e6508ca..486675ec26d918587fb1dc9c2cdcf2c88ff55d22 100755 (executable)
@@ -3,7 +3,7 @@
 USING: namespaces make math math.order math.parser sequences accessors
 kernel kernel.private layouts assocs words summary arrays
 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
 compiler.errors
 compiler.alien
@@ -464,7 +464,7 @@ TUPLE: callback-context ;
     dup current-callback eq? [
         drop
     ] [
-        yield-hook get call wait-to-return
+        yield-hook get call( -- ) wait-to-return
     ] if ;
 
 : do-callback ( quot token -- )
index 9cadb3f6cc2b6df7eb3917e5f27b348b363b0617..ad59cbc6327bf00219de00c1e1488b76d91ba5ab 100644 (file)
@@ -1,8 +1,8 @@
-! Copyright (C) 2008 Slava Pestov.
+! Copyright (C) 2008, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: io.encodings io.backend io.ports io.streams.duplex
 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 ;
 IN: io.pipes
 
@@ -29,11 +29,12 @@ HOOK: (pipe) io-backend ( -- pipe )
 : ?writer ( handle/f -- stream )
     [ <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
     [
-        [ [ ?reader ] [ ?writer ] bi* ] dip with-streams*
+        [ [ ?reader ] [ ?writer ] bi* ] dip
+        '[ _ call( -- result ) ] with-streams*
     ] with-destructors ;
 
 : <pipes> ( n -- pipes )
index 659195edbf3cc99416dfde3917e6de86daaf1b9e..5e12322a4868cceaee6a96a3864f5dcbe5db44f7 100644 (file)
@@ -30,7 +30,7 @@ ERROR: duplicate-slot-names names ;
 
 ERROR: invalid-slot-name name ;
 
-: parse-long-slot-name ( -- )
+: parse-long-slot-name ( -- spec )
     [ scan , \ } parse-until % ] { } make ;
 
 : parse-slot-name ( string/f -- ? )
@@ -64,7 +64,7 @@ ERROR: bad-literal-tuple ;
 
 : parse-slot-value ( -- )
     scan scan-object 2array , scan {
-        { f [ unexpected-eof ] }
+        { f [ \ } unexpected-eof ] }
         { "}" [ ] }
         [ bad-literal-tuple ]
     } case ;
@@ -72,13 +72,13 @@ ERROR: bad-literal-tuple ;
 : (parse-slot-values) ( -- )
     parse-slot-value
     scan {
-        { f [ unexpected-eof ] }
+        { f [ \ } unexpected-eof ] }
         { "{" [ (parse-slot-values) ] }
         { "}" [ ] }
         [ bad-literal-tuple ]
     } case ;
 
-: parse-slot-values ( -- )
+: parse-slot-values ( -- values )
     [ (parse-slot-values) ] { } make ;
 
 : boa>tuple ( class slots -- tuple )
index 0852459c34101c26cf1f891af5b9e49a64cd4f16..bf9cdb19f5de56506a91c7693bb7c51ef42a2bf0 100644 (file)
@@ -18,6 +18,6 @@ SYMBOL: current-method
 : with-method-definition ( method quot -- )
     over current-method set call current-method off ; inline
 
-: (M:) ( method def -- )
+: (M:) ( -- method def )
     CREATE-METHOD [ parse-definition ] with-method-definition ;
 
index c68d453b154b8f0554aecf00584c75a121e42a9f..dddea09db96d1a075487cbb529798a9de173fa45 100644 (file)
@@ -214,7 +214,7 @@ print-use-hook [ [ ] ] initialize
     [
         V{ } clone amended-use set
         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 ;
 
 : parsing-file ( file -- )