]> gitweb.factorcode.org Git - factor.git/blob - basis/tools/walker/debug/debug.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / tools / walker / debug / debug.factor
1 ! Copyright (C) 2004, 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: concurrency.promises models tools.walker tools.continuations
4 kernel sequences concurrency.messaging locals continuations threads
5 namespaces namespaces.private assocs accessors ;
6 IN: tools.walker.debug
7
8 :: test-walker ( quot -- data )
9     <promise> :> p
10     [
11         H{ } clone >n
12
13         [
14             p promise-fulfilled?
15             [ drop ] [ p fulfill ] if
16             2drop
17         ] show-walker-hook set
18
19         break
20
21         quot call
22     ] "Walker test" spawn drop
23
24     step-into-all
25     p ?promise
26     send-synchronous drop
27
28     p ?promise
29     variables>> walker-continuation of
30     value>> data>> ;