Fix step-into on generic words and call-next-method in walker
parent
bae00e8bab
commit
b0d11073d6
|
@ -309,3 +309,11 @@ M: xref-tuple-2 xref-test (xref-test) ;
|
|||
\ xref-test
|
||||
\ xref-tuple-2 \ xref-test method [ usage unique ] closure key?
|
||||
] unit-test
|
||||
|
||||
[ t ] [
|
||||
{ } \ nth effective-method nip \ sequence \ nth method eq?
|
||||
] unit-test
|
||||
|
||||
[ t ] [
|
||||
\ + \ nth effective-method nip dup \ nth "default-method" word-prop eq? and
|
||||
] unit-test
|
||||
|
|
|
@ -105,7 +105,9 @@ ERROR: no-next-method class generic ;
|
|||
] [ ] make ;
|
||||
|
||||
: single-effective-method ( obj word -- method )
|
||||
[ order [ instance? ] with find-last nip ] keep method ;
|
||||
[ [ order [ instance? ] with find-last nip ] keep method ]
|
||||
[ "default-method" word-prop ]
|
||||
bi or ;
|
||||
|
||||
TUPLE: standard-combination # ;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
USING: tools.walker io io.streams.string kernel math
|
||||
math.private namespaces prettyprint sequences tools.test
|
||||
continuations math.parser threads arrays tools.walker.debug ;
|
||||
continuations math.parser threads arrays tools.walker.debug
|
||||
generic.standard ;
|
||||
IN: tools.walker.tests
|
||||
|
||||
[ { } ] [
|
||||
|
@ -97,6 +98,9 @@ IN: tools.walker.tests
|
|||
[ { 6 } ]
|
||||
[ [ [ 3 throw ] [ 2 * ] recover ] test-walker ] unit-test
|
||||
|
||||
[ { T{ no-method f + nth } } ]
|
||||
[ [ [ 0 \ + nth ] [ ] recover ] test-walker ] unit-test
|
||||
|
||||
[ { } ] [
|
||||
[ "a" "b" set "c" "d" set [ ] test-walker ] with-scope
|
||||
] unit-test
|
||||
|
|
|
@ -83,6 +83,9 @@ M: object add-breakpoint ;
|
|||
: (step-into-continuation) ( -- )
|
||||
continuation callstack >>call break ;
|
||||
|
||||
: (step-into-call-next-method) ( class generic -- )
|
||||
next-method-quot (step-into-quot) ;
|
||||
|
||||
! Messages sent to walker thread
|
||||
SYMBOL: step
|
||||
SYMBOL: step-out
|
||||
|
@ -132,6 +135,7 @@ SYMBOL: +stopped+
|
|||
{ if [ (step-into-if) ] }
|
||||
{ dispatch [ (step-into-dispatch) ] }
|
||||
{ continuation [ (step-into-continuation) ] }
|
||||
{ (call-next-method) [ (step-into-call-next-method) ] }
|
||||
} [ "step-into" set-word-prop ] assoc-each
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue