Get cont-responder contrib examples working again, and more fixes to cont-responder for continuation word

changes.
cvs
Chris Double 2005-09-18 05:55:18 +00:00
parent 7decaf614e
commit 8d805d3dcb
2 changed files with 8 additions and 2 deletions

View File

@ -174,6 +174,8 @@ USE: sequences
"eval" get "eval" get
] bind ; ] bind ;
: >pop> dup pop* ;
: infra ( list quot -- list ) : infra ( list quot -- list )
#! Call the quotation using 'list' as the datastack #! Call the quotation using 'list' as the datastack
#! return the result datastack as a list. #! return the result datastack as a list.

View File

@ -43,14 +43,18 @@ SYMBOL: post-refresh-get?
[ 32 [ 0 9 random-int CHAR: 0 + , ] times ] "" make [ 32 [ 0 9 random-int CHAR: 0 + , ] times ] "" make
string>number 36 >base ; string>number 36 >base ;
SYMBOL: table
: continuation-table ( -- <hashtable> ) : continuation-table ( -- <hashtable> )
#! Return the global table of continuations #! Return the global table of continuations
{{ }} ; table global hash ;
: reset-continuation-table ( -- ) : reset-continuation-table ( -- )
#! Create the initial global table #! Create the initial global table
continuation-table hash-clear ; continuation-table hash-clear ;
{{ }} clone table global set-hash
#! Tuple for holding data related to a continuation. #! Tuple for holding data related to a continuation.
TUPLE: item expire? quot id time-added ; TUPLE: item expire? quot id time-added ;
@ -190,7 +194,7 @@ SYMBOL: callback-cc
continue continue
] callcc1 ( 0 [ ] == ) ] callcc1 ( 0 [ ] == )
nip nip
continue call
store-callback-cc store-callback-cc
] callcc0 ; ] callcc0 ;