Compiled COMPILE forms at load time Bug
Helmut Eller
heller at common-lisp.net
Sun Feb 14 22:15:23 CET 2010
* Raymond Toy [2010-02-14 21:04+0100] writes:
> This immediate issue can be fixed by modifying
> function-lambda-expression in eval.lisp. In the first clause of the
> cond expression, change it to (and source (eq (c::debug-source-from
> source) :lisp) ...).
>
> That takes care of that problem. But now cmucl will complain that the
> function is the function #<Function "COMPILE NIL"> was defined in a
> non-null lexical environment. I don't know if that's right or not.
Seems like a cryptic way to say that the lambda-expression isn't
available.
But we don't need the lambda-expression. To quote the CLHS entry for
compile:
If the definition is already a compiled function, compile either
produces that function itself (i.e., is an identity operation) or an
equivalent function.
We could probably fix the problem by binding form in compile in
main.lisp with something like this:
(form (etypecase definition
((or cons eval:interpreted-function)
`#',(get-lambda-to-compile definition))
(function `',definition)))
Helmut
More information about the cmucl-imp
mailing list