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