How to recompile bits of a running function as you want is actually an interesting research problem. It comes up when you have optimized code, then change declarations that the optimizations depend on. For example, you might inline the access to a slot in an object, then dynamically change the layout of the object.
This is properly something the Lisp implementation should handle. Robert Strandh had an interesting approach to this for SICL that he described in a recent ELS.
How to recompile bits of a running function as you want is actually an interesting research problem. It comes up when you have optimized code, then change declarations that the optimizations depend on. For example, you might inline the access to a slot in an object, then dynamically change the layout of the object.
This is properly something the Lisp implementation should handle. Robert Strandh had an interesting approach to this for SICL that he described in a recent ELS.
http://metamodular.com/SICL/call-site-optimization.pdf