Interpreter fix

release
Slava Pestov 2007-10-09 01:30:28 -04:00
parent c644f21daf
commit 886d14130d
3 changed files with 13 additions and 2 deletions

View File

@ -299,3 +299,7 @@ unit-test
[ 2 break 2 \ + (step-into) . ] (remove-breakpoints) [ 2 break 2 \ + (step-into) . ] (remove-breakpoints)
] unit-test ] unit-test
[ [ 2 . ] ] [
[ 2 \ break (step-into) . ] (remove-breakpoints)
] unit-test

View File

@ -99,7 +99,12 @@ SYMBOL: ->
building get dup empty? [ building get dup empty? [
drop \ (step-into) , drop \ (step-into) ,
] [ ] [
pop dup wrapper? [ wrapped ] when , pop dup wrapper? [
wrapped dup \ break eq?
[ drop ] [ , ] if
] [
,
] if
] if ; ] if ;
: (remove-breakpoints) ( quot -- newquot ) : (remove-breakpoints) ( quot -- newquot )

View File

@ -65,12 +65,14 @@ M: word (step-into) (step-into-execute) ;
{ {
>n ndrop >c c> >n ndrop >c c>
continue continue-with continue continue-with
(continue-with) stop break (continue-with) stop
} [ } [
dup [ execute break ] curry dup [ execute break ] curry
"step-into" set-word-prop "step-into" set-word-prop
] each ] each
\ break [ break ] "step-into" set-word-prop
! Stepping ! Stepping
: change-innermost-frame ( quot interpreter -- ) : change-innermost-frame ( quot interpreter -- )
interpreter-continuation [ interpreter-continuation [