Fix walker with dip

db4
Slava Pestov 2008-11-23 22:28:39 -06:00
parent c9abd2f868
commit 915bf0c449
1 changed files with 11 additions and 11 deletions
basis/tools/walker

View File

@ -109,25 +109,25 @@ SYMBOL: +stopped+
: change-frame ( continuation quot -- continuation' )
#! Applies quot to innermost call frame of the
#! continuation.
>r clone r> [
>r clone r>
[ clone ] dip [
[ clone ] dip
[
>r
[ innermost-frame-scan 1+ ]
[ innermost-frame-quot ] bi
r> call
[
[ innermost-frame-scan 1+ ]
[ innermost-frame-quot ] bi
] dip call
]
[ drop set-innermost-frame-quot ]
[ drop ]
2tri
] curry change-call ; inline
: step-msg ( continuation -- continuation' )
: step-msg ( continuation -- continuation' ) USE: io
[
2dup nth \ break = [
nip
] [
swap 1+ cut [ break ] swap 3append
2dup length = [ nip [ break ] append ] [
2dup nth \ break = [ nip ] [
swap 1+ cut [ break ] swap 3append
] if
] if
] change-frame ;