diff --git a/basis/tools/trace/trace.factor b/basis/tools/trace/trace.factor index 430ea9045b..e2c6bf864b 100644 --- a/basis/tools/trace/trace.factor +++ b/basis/tools/trace/trace.factor @@ -79,3 +79,5 @@ M: trace-step summary [ [ trace-step ] break-hook ] dip [ break ] [ end drop ] surround with-variable ; + +<< \ trace t "no-compile" set-word-prop >> \ No newline at end of file diff --git a/basis/tools/walker/walker-tests.factor b/basis/tools/walker/walker-tests.factor index 3a5877c286..6dabb73e30 100644 --- a/basis/tools/walker/walker-tests.factor +++ b/basis/tools/walker/walker-tests.factor @@ -1,7 +1,8 @@ USING: tools.walker io io.streams.string kernel math math.private namespaces prettyprint sequences tools.test continuations math.parser threads arrays tools.walker.debug -generic.standard sequences.private kernel.private ; +generic.standard sequences.private kernel.private +tools.continuations accessors words ; IN: tools.walker.tests [ { } ] [ @@ -112,3 +113,22 @@ IN: tools.walker.tests [ { } ] [ [ "a" "b" set "c" "d" set [ ] test-walker ] with-scope ] unit-test + +: breakpoint-test ( -- x ) break 1 2 + ; + +\ breakpoint-test don't-step-into + +[ f ] [ \ breakpoint-test optimized>> ] unit-test + +[ { 3 } ] [ [ breakpoint-test ] test-walker ] unit-test + +GENERIC: method-breakpoint-test ( x -- y ) + +TUPLE: method-breakpoint-tuple ; + +M: method-breakpoint-tuple method-breakpoint-test break drop 1 2 + ; + +\ method-breakpoint-test don't-step-into + +[ { 3 } ] +[ [ T{ method-breakpoint-tuple } method-breakpoint-test ] test-walker ] unit-test \ No newline at end of file diff --git a/basis/tools/walker/walker.factor b/basis/tools/walker/walker.factor index a1f18df57a..4208c4420f 100644 --- a/basis/tools/walker/walker.factor +++ b/basis/tools/walker/walker.factor @@ -5,7 +5,7 @@ sequences math namespaces.private continuations.private concurrency.messaging quotations kernel.private words sequences.private assocs models models.arrow arrays accessors generic generic.standard definitions make sbufs -tools.continuations ; +tools.continuations parser ; IN: tools.walker SYMBOL: show-walker-hook ! ( status continuation thread -- ) @@ -35,6 +35,8 @@ DEFER: start-walker-thread : walk ( quot -- quot' ) \ break prefix [ break rethrow ] recover ; +<< \ walk t "no-compile" set-word-prop >> + break-hook [ [ get-walker-thread @@ -159,4 +161,4 @@ SYMBOL: +stopped+ ! For convenience IN: syntax -: B ( -- ) break ; +SYNTAX: B \ break parsed ;