Comment 0 for bug 1819015

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

One can get the definition of ordinary functios using FUNCTION-LAMBDA-EXPRESSION, but there is nothing similar for methods.

Add a means for obtaining the source for a method from the method object, and also a means of replacing and restoring a method object for a generic function.

It might be necessary to cheat a bit due to methods being defined in a lexical environment which may no longer be available, but that applies to the lambda expression from FUNCTION-LAMBDA-EXPRESSION as well.

The use case for this is to do mutation testing on Common Lisp code. This would involve getting the definitions of functions and methods, mutating them, and seeing if the test suite kills the mutants.