[Ecls-list] make-load-form patch

Juan Jose Garcia Ripoll lisp at arrakis.es
Tue May 16 09:26:00 UTC 2006


On Tue, 2006-05-16 at 10:47 +0900, Brian Spilsbury wrote:
> This patch causes ecl to compile code using make-load-form.
> There are no known problems, but it hasn't been tested much, so please
> let me know of any problems which turn up.

Thanks for your patches! I have heavily redesigned them. The entry point
for storing constants is not c1constant-value but add-object. This is
where the code now goes. I was also tempted to merge the code for
load-time-values and load-forms, but it was not worth the effort.

Also, with your code, since you do not use add-object, load forms had to
be created for too many objects. Now they are only created when needed,
depending on the output of need-to-make-load-form-p.

Furthermore, need-to-make-load-form-p has been recoded to be faster on
atomic objects and to complain on circular structures. If you try to
externalize something like
  (1 2 3  #<a standard-object>)
it is ok, but if you try externalizing
  #1=(1 2 3  #<a standard-object> #1#)
ECL will complain that it cannot do such a thing. I think this is a
reasonable compromise.

A different issue is whether make-load-form should preserve that objects
which are EQL in the source are also EQL in the object file. That seems
more difficult to achieve.

After some testing it seems ECL now compiles at least your simple
problem and does not change the compiled output of other code, like the
ECL core library. I have thus committed the new feature to CVS.

I will study your other patches later. But I have one question: patch.7
also contained a change unrelated to make-load-form.
>     (cond ((eq fun 'CB)
>            (setq ccb t))
>         ((eq fun 'LB)
>            (setq clb t))
>         ((and (consp fun)
>                 (equal fname (first fun))
>                 (eq (second fun) 'MACRO))
Is this part of your environment patches?

Thanks a lot, once more!

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/20060516/928fe4be/attachment.sig>


More information about the ecl-devel mailing list