[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tracing generic functions



  To: commonloops.pa@xerox.com
  Subject: tracing generic functions
  X-Mailer: mh6.5
  Date: Wed, 05 Oct 88 19:09:13 PDT
  Message-Id: <7603.592106953@hplwhh>
  From: Warren Harris <harris%hplwhh@hplabs.hp.com>
  
  Does the CLOS spec say anything about what should happen when you trace a
  generic function?  I notice that in the AAAI PCL (Lucid) the following
  doesn't work:
  
  > (trace no-applicable-method)
  (NO-APPLICABLE-METHOD)
  > (generic-function-methods #'no-applicable-method)
  
  >>Error: No matching method for the generic-function
  #<Compiled-Function GENERIC-FUNCTION-METHODS 5EDD4F>,
  when called with arguments (#<Compiled-Function (:ADVICE
  NO-APPLICABLE-METHOD :TRACE) 6FEE57>).
  
  NOTICE-METHODS-CHANGE-2:
     Required arg 0 (GENERIC-FUNCTION): #<Compiled-Function
  NO-APPLICABLE-METHOD 6016B7>
     Required arg 1 (ARGS): (#<Compiled-Function GENERIC-FUNCTION-METHODS
  5EDD4F> #<Compiled-Function (:ADVICE NO-APPLICABLE-METHOD :TRACE) 6FEE57>)
  
  :A    Abort to Lisp Top Level
  -> 
  
  Sorry if this is in the spec and I missed it.
  
  Warren

What happened is that when you traced no-applicable-method, trace
wrapped some advice around it.  So i no longer appears as a generic.
If you really want to get confused, try recompiling a
no-applicable-method method after you've traced it.  To make PCL
really work, we need to make advice smarter about generic functions
and visa vera.

k