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

Raymond Toy toy.raymond at gmail.com
Sun Feb 14 21:04:56 CET 2010


On 2/14/10 12:50 PM, Madhu wrote:
> CMUCL's file compiler does not correctly compile "top level" COMPILE
> forms in the source.  Quick sketch:
>
> $ echo '(compile nil (lambda (x) x))' > foo.lisp
> $ lisp -noinit
> * (compile-file "foo.lisp")
> * (load *)
>
> At FASL Load Time this results in an error, with a `back' stack that
> looks like:
>
> Type-error in KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER:
>    NIL is not of type C::DEBUG-SOURCE
>
> 0: (FUNCTION-LAMBDA-EXPRESSION #<Function "COMPILE NIL" {5863BFB1}>)
>   

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.

Ray




More information about the cmucl-imp mailing list