step-into for hooks
parent
56892ae74a
commit
0c7e742b8c
|
@ -110,6 +110,9 @@ ERROR: no-next-method class generic ;
|
|||
\ if ,
|
||||
] [ ] make ;
|
||||
|
||||
: single-effective-method ( obj word -- method )
|
||||
[ order [ instance? ] with find-last nip ] keep method ;
|
||||
|
||||
TUPLE: standard-combination # ;
|
||||
|
||||
C: <standard-combination> standard-combination
|
||||
|
@ -142,8 +145,7 @@ M: standard-combination next-method-quot*
|
|||
] with-standard ;
|
||||
|
||||
M: standard-generic effective-method
|
||||
[ dispatch# (picker) call ] keep
|
||||
[ order [ instance? ] with find-last nip ] keep method ;
|
||||
[ dispatch# (picker) call ] keep single-effective-method ;
|
||||
|
||||
TUPLE: hook-combination var ;
|
||||
|
||||
|
@ -161,6 +163,10 @@ M: hook-combination dispatch# drop 0 ;
|
|||
|
||||
M: hook-generic extra-values drop 1 ;
|
||||
|
||||
M: hook-generic effective-method
|
||||
[ "combination" word-prop var>> get ] keep
|
||||
single-effective-method ;
|
||||
|
||||
M: hook-combination make-default-method
|
||||
[ error-method ] with-hook ;
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ M: object add-breakpoint ;
|
|||
{
|
||||
{ [ dup "step-into" word-prop ] [ "step-into" word-prop call ] }
|
||||
{ [ dup standard-generic? ] [ effective-method (step-into-execute) ] }
|
||||
{ [ dup hook-generic? ] [ effective-method (step-into-execute) ] }
|
||||
{ [ dup primitive? ] [ execute break ] }
|
||||
{ [ t ] [ word-def (step-into-quot) ] }
|
||||
} cond ;
|
||||
|
|
Loading…
Reference in New Issue