tracing labels in methods

Damien Kick <[email protected]> Tue, 19 Dec 2006 21:13:37 +0000 (UTC)
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Is it possible to trace location function inside of a method?

PG-USER> (defun f ()
           (labels ((%lemma () 69))
             (%lemma)))
F
PG-USER> (compile 'f)
F
NIL
NIL
PG-USER> (trace f)
(F)
PG-USER> (trace ((labels f %lemma)))
((LABELS F %LEMMA))
PG-USER> (defmethod g ()
           (labels ((%lemma () 13))
             (%lemma)))
#<STANDARD-METHOD G NIL>
PG-USER> (compile 'g)
G
NIL
NIL
PG-USER> (trace g)
(G)
PG-USER> (trace ((method g ())))
((METHOD G NIL))
PG-USER> (handler-case
             (trace ((labels g %lemma)))
           (condition (c) c))
#<TYPE-ERROR @ #x215b2b22>
PG-USER> (handler-case
             (trace ((labels (method g ()) %lemma)))
           (condition (c) c))
#<TYPE-ERROR @ #x215b76c2>
PG-USER> (handler-case
             (trace ((labels ((method g ())) %lemma)))
           (condition (c) c))
#<TYPE-ERROR @ #x215b967a>
PG-USER>