[cmucl-imp] Re: Compiled COMPILE forms at load time Bug

Raymond Toy toy.raymond at gmail.com
Sun Feb 14 22:37:11 CET 2010


On 2/14/10 4:15 PM, Helmut Eller wrote:
> * 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)))
>
>   
That certainly fixes the problem.  I'll want to run a few other tests on
this and if all goes well, I'll check it in.

Thanks!

Ray




More information about the cmucl-imp mailing list