The following patch modifies PROFILE so that it tries to use the
encapsulation facility provided in "fdefinition.lisp".
User visible changes:
1) redefining profiled generic functions doesn't signal an error,
because fdefinition returns the unencapsulated, generic,
function, not the profiled encapsulation.
2) Redefining profiled functions continues profiling, using the new
definition, rather than not profiling the new definition. (The
"suspect times!" warning on the report is kept.)
3) [If for some reason it were advisable to use this...] Tracing
and profiling encapsulations are orthogonal, although tracing a
profiled function does not profile the trace code (reprofiling is
I've included a file with commented test code which shows 1, 2 and 3.
1) would close part of bug 241, which I think is two different bugs (I
sent an argument for this in the "Bug 241 information" message). As
noted in some of the (mostly personal, delete at will!) comments,
there are another couple of changes I can think of that might simplify
things, but I thought I'd send this patch in for possible feedback and
so that, if it's judged ok, it can be done incrementally.
Any comments most welcome!