Fix walker with dip
parent
c9abd2f868
commit
915bf0c449
|
@ -109,26 +109,26 @@ SYMBOL: +stopped+
|
||||||
: change-frame ( continuation quot -- continuation' )
|
: change-frame ( continuation quot -- continuation' )
|
||||||
#! Applies quot to innermost call frame of the
|
#! Applies quot to innermost call frame of the
|
||||||
#! continuation.
|
#! continuation.
|
||||||
>r clone r> [
|
[ clone ] dip [
|
||||||
>r clone r>
|
[ clone ] dip
|
||||||
|
[
|
||||||
[
|
[
|
||||||
>r
|
|
||||||
[ innermost-frame-scan 1+ ]
|
[ innermost-frame-scan 1+ ]
|
||||||
[ innermost-frame-quot ] bi
|
[ innermost-frame-quot ] bi
|
||||||
r> call
|
] dip call
|
||||||
]
|
]
|
||||||
[ drop set-innermost-frame-quot ]
|
[ drop set-innermost-frame-quot ]
|
||||||
[ drop ]
|
[ drop ]
|
||||||
2tri
|
2tri
|
||||||
] curry change-call ; inline
|
] curry change-call ; inline
|
||||||
|
|
||||||
: step-msg ( continuation -- continuation' )
|
: step-msg ( continuation -- continuation' ) USE: io
|
||||||
[
|
[
|
||||||
2dup nth \ break = [
|
2dup length = [ nip [ break ] append ] [
|
||||||
nip
|
2dup nth \ break = [ nip ] [
|
||||||
] [
|
|
||||||
swap 1+ cut [ break ] swap 3append
|
swap 1+ cut [ break ] swap 3append
|
||||||
] if
|
] if
|
||||||
|
] if
|
||||||
] change-frame ;
|
] change-frame ;
|
||||||
|
|
||||||
: step-out-msg ( continuation -- continuation' )
|
: step-out-msg ( continuation -- continuation' )
|
||||||
|
|
Loading…
Reference in New Issue