Get cont-responder contrib examples working again, and more fixes to cont-responder for continuation word
changes.cvs
parent
7decaf614e
commit
8d805d3dcb
|
@ -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.
|
||||||
|
|
|
@ -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 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue