On 3/10/10 1:27 PM, Helmut Eller wrote:
We could add this
(when (typep definition '(and function (not eval:interpreted-function))) (when name (setf (fdefinition name) definition)) (return-from compile (values definition nil nil)))
If I understand this correctly, this will just return the original definition. If so, then I wasn't quite clear about the (compile 'foo) example. The second compile would actually recompile foo from the original sources, not return the already previously compiled function. This is handy if you've changed something like a macro or inline function and want to compile foo again to see the effect.
right before the with-compilation-unit form. We can't return-from inside the with-compilation-unit without producing some error message so we have to put it before it. We'd lose some restarts, but that should only be noticeable if (setf (fdefinition ..)) hits a definition lock and it's not required by the spec anyway.
Then form would be bound as it used to be (form `#',(get-lambda-to-compile definition).
I think we still need the additional fix in function-lambda-expression in case the compiled-debug-info-source is NIL.
I think we always have the lambda expression for interpreted functions.
Yes, this is true. But for some reason, in Madhu's example, the compiled-debug-info-source is NIL, hence the traceback that he shows. Ray