>>>>> "Chisheng" == Chisheng Huang <[EMAIL PROTECTED]> writes:


    Chisheng> (trace x :wherein (method call-x (babu)))
    Chisheng>                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^         
    Chisheng> If I remember correctly, this is what Slime is using for CMUCL 
right now.
    Chisheng> If we allow (METHOD CALL-X (BABU)) be a "name", this should be 
O.K., too.
    Chisheng> Afterall, we can do (TRACE (METHOD CALL-X (BABU))).

I haven't implemented this because I didn't want to think about how to
distuinguish this from a list of functions, but it seems to work now:

   (defclass babu () ())

   (defun x (babu)
     (when babu
       (random 1000)))

   (defmethod call-x ((babu babu))
     (cons 42 (x babu)))

   (defmethod call-x :before ((babu babu))
     (cons 'before (x babu)))

   (defmethod call-x ((z integer))
     (cons 'a (x z)))


   (trace x :wherein ((method call-x (babu))))

   (call-x z) => (a . 243)

   (call-x (make-instance 'babu)) =>

     0: (X #<BABU {403F6005}>)
     0: X returned 77
   (42 . 77)


If slime really wants to use the form (method call-x (babu)) instead
of ((method call-x (babu))), I guess that can be arranged.

Ray


Reply via email to