[Ecls-list] make-load-form fix
Juan Jose Garcia Ripoll
lisp at arrakis.es
Mon May 29 01:01:02 UTC 2006
On Fri, 2006-05-26 at 20:38 +0200, Julian Stecklina wrote:
> Juan Jose Garcia Ripoll <lisp at arrakis.es> writes:
> > Ok, I see the typo in the original code. But I think it is much simpler
> > to create a constant list with the initial data except for sites which
> > reference the array itself or other non-printable structures. The latter
> > would then appear in a smaller number of initialization statements. I
> > will code that later.
>
> Does this cover the case where the array is not trivially
> self-referential? Say if it contains a structure or cons which in turn
> references the array?
The way ECL's compiler handle complex constants is as follows:
1. Add the constant to a hash table with an index to the position
in the constant data table that is built at run time
2. If the constant does not require a load form, add it to the
string from which constant data is read at run time.
3. If the constant requires a load form
1. Invoke MAKE-LOAD-FORM to obtain a "make" and an
"initialization" form.
2. Compile the "make" form
3. Compile the "init" form
As you see, the process is recursive. When the object that requires a
load form appears again in the construction ("make") or in the
initialization ("init") forms, the compiler will already know where to
fetch it from.
Juanjo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20060529/9befebc9/attachment.sig>
More information about the ecl-devel
mailing list