[Ecls-list] LOAD-TIME-VALUE and literal object externalisation.
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Sun Apr 13 08:53:57 UTC 2008
On Fri, Apr 11, 2008 at 12:27 PM, Samium Gromoff
<_deepfire at feelingofgreen.ru> wrote:
> So, here's the test case:
> (eval-when (:compile-toplevel :load-toplevel :execute)
> (defparameter foo (lambda ())))
> (load-time-value foo)
> deepfire at canopus:~/local/mdb$ ecl -eval '(compile-file "foo.lisp")'
> ;;; Loading #P"/usr/lib/ecl/cmp.fas"
> ;;; Loading #P"/usr/lib/ecl/sysfun.lsp"
> ;;; Compiling foo.lisp.
> ;;; Compiling (DEFPARAMETER FOO ...).
> An error occurred during initialization:
> Object #<bytecompiled-function 08091af0> cannot be externalized.
Thanks for reporting this bug. LOAD-TIME-VALUE was unfortunately coded
so as to handle properly lists and objects other than symbols. I had
not contemplated the possibility of using global variables. That
produced all problems.
Now, as for your code, beware that LOAD-TIME-VALUE may be evaluated
_earlier_ than you expect, even before the DEFPARAMETER definition in
your code. This is not the case in ECL, but the standard I think
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
More information about the ecl-devel