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

[no subject]

I think there is already a good way for all kinds of tracing
to identify themselves to things like List Callers.
A traced function is a named-lambda which has a slot in its debugging
info (named TRACE?  I forget) which points at the symbol whose
definition is the real original definition.  I think this is what
GRIND and some other things use to find the original definition.
COMPILE probably does too.

The list of traced functions maintained by TRACE shouldn't be used any
more except by (UNTRACE).

Metering and user-written trace packages can use this same method.
Multiple kinds of tracing on one function win since the mechanism can
be used recursively.

This mechanism is no good for advising, because advising shouldn't
behave the same way as tracing.  For example, List Callers should
consider an advised function to be a caller if either the original
definition or the advice mentions the called function.  Grind should
probably print the advice in some form.  Perhaps Compile should
compile the advice as well as the original definition.

Maybe the right way to advise a function is to create a new definition
(lambda (...) (prog () before-advice
		    (return-list (prog1 (multiple-value-list old-body)
or else use a macro which expands into that.