Fix walker bug and implement step-into for quotations

release
Slava Pestov 2007-10-07 18:17:14 -04:00
parent 554507cf00
commit d7c6ead7ee
3 changed files with 20 additions and 2 deletions

View File

@ -197,3 +197,4 @@ GENERIC: (step-into) ( obj -- )
M: wrapper (step-into) wrapped break ;
M: object (step-into) break ;
M: callable (step-into) \ break add* break ;

View File

@ -1,7 +1,8 @@
USING: arrays continuations ui.tools.listener ui.tools.walker
ui.tools.workspace inspector kernel namespaces sequences threads
listener tools.test ui ui.gadgets ui.gadgets.worlds
ui.gadgets.packs vectors ui.tools ;
ui.gadgets.packs vectors ui.tools tools.interpreter
tools.interpreter.debug ;
IN: temporary
[ ] [ <walker> "walker" set ] unit-test
@ -51,3 +52,17 @@ IN: temporary
swap second \ inspect eq? and
] unit-test
] with-scope
[
f <workspace> <test-world> 2array 1vector windows set
[ ] [
[ 2 3 break 4 ] quot>cont f swap 2array walker call-tool
] unit-test
[ ] [ walker get-tool com-continue ] unit-test
[ ] [ yield ] unit-test
[ t ] [ walker get-tool walker-active? ] unit-test
] with-scope

View File

@ -65,7 +65,9 @@ M: walker call-tool* ( continuation walker -- )
] if ;
: com-continue ( walker -- )
dup walker-interpreter step-all reset-walker ;
#! Reset walker first, in case step-all ends up calling
#! the walker again.
dup walker-interpreter swap reset-walker step-all ;
: walker-help "ui-walker" help-window ;