[Ecls-list] LOAD-TIME-VALUE and literal object externalisation.
_deepfire at feelingofgreen.ru
Thu Apr 24 09:07:15 UTC 2008
At Thu, 24 Apr 2008 09:26:36 +0200,
Juan Jose Garcia-Ripoll wrote:
> On Wed, Apr 23, 2008 at 3:56 PM, Juan Jose Garcia-Ripoll
> <jjgarcia at users.sourceforge.net> wrote:
> > So, summing up:
> > 1) I have to fix ECL to also externalize hash tables
> My brain must have been too dry yesterday. The problem was not with
> the hash table. The problem you had was with externalizing a C
> compiled function.
Hmm, does it /have/ to externalize a compiled function, though?
As I understand it, the (load-time-value (gethash)) yielding a lambda
gets evaluated during LOAD-time, which, as I understand, makes it
exempt from literal object externalization problems, no?
I think that's the relevant CLHS passage wrt. LOAD-TIME-VALUE:
> If a load-time-value expression is processed by compile-file,
> the compiler performs its normal semantic processing (such as
> macro expansion and translation into machine code) on form,
> but arranges for the execution of form to occur at load time
> in a null lexical environment, with the result of this evaluation
> then being treated as a literal object at run time.
> It is guaranteed that the evaluation of form will take place only once
> when the file is loaded, but the order of evaluation with respect
> to the evaluation of top level forms in the file is
I.e. the gethash in foo1.lisp only needs to retrieve a (non-literal) lambda
which was already successfully compiled, stored and loaded during
the processing of (load (compile-file "foo.lisp"))
Or am I missing something?
regards, Samium Gromoff
More information about the ecl-devel