I've just checked in half of the work necessary to allow users to
trace individual methods; it's not strictly necessary, but having
method lambdas named by (METHOD FOO (FIXNUM)) or (FAST-METHOD FOO
:AROUND (NUMBER)) makes it easier to reason about than the horrible
symbol-mangled names: and maybe these names are better insulated
against package changing, too. This part was inspired by CMUCL's use
of my "generalized function names".
Right now, a user can do
(trace :encapsulate nil (sb-pcl::fast-method foo (fixnum)))
to trace calls to the method FOO with a FIXNUM specializer. The
:ENCAPSULATE NIL is needed because the function itself, not the name
is stored and communicated internally to PCL.
I would like to offer a friendlier syntax in TRACE for this purpose;
I'd like to co-opt (METHOD FOO (FIXNUM)) as shorthand for "whichever
of (METHOD FOO (FIXNUM)) and (FAST-METHOD FOO (FIXNUM)) is defined".
Given the obvious ambiguity (and the FIXME comment that I've
introduced in src/pcl/compiler-support.lisp) maybe now is the time to
rename (METHOD ...) functions to (SLOW-METHOD ...) [LESS-FAST-METHOD]?
I don't know what this implies, but I doubt it's very much.
I would also like to add a :METHODS option (defaulting to NIL) to
TRACE, to indicate that generic functions in the trace list should
have all their methods traced rather than just the generic function
itself. Sample usage:
(trace :encapsulate nil :methods t documentation (setf documentation))
I wonder what the status of the t default to encapsulate is. I seem
to remember it was set that way because one of the function return
styles is incompatible with breakpoint-style tracing; on the other
hand, being able to trace methods is likely to be a sufficiently
useful feature that maintaining the breakpoint functionality has an