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

Redefining Traced Generic Functions

At various times, people have reported that it is not possible to
redefine a generic function which is being traced without 
ENSURE-GENERIC-FUNCTION complaining that it is not a generic function.
This happens because the wrapper is, in fact, not a generic function,
so it can't be passed. The following code fixes this problem in
Lucid Common Lisp 3.0:

;;from defs.lisp

(defun gdefinition (spec)
  (parse-gspec spec
    (name (or (macro-function name)		;??
	      (symbol-generic-function name)))
    (name (symbol-generic-function (get-setf-function-name name)))))

;;Should go in lucid-low.lisp.

;;symbol-generic-function-If the function is traced or advised, return the 
;; function traced or advised. 

(defun symbol-generic-function (symbol)
  (lucid::trace-get-real-procedure (symbol-function symbol)))

;;The reverse operation, SETF-ing a traced function, should work fine in
;;  lucid, but maybe not in others.