[Ecls-list] make-load-form fix

Julian Stecklina der_julian at web.de
Fri May 26 11:39:07 UTC 2006


Juan Jose Garcia Ripoll <lisp at arrakis.es> writes:

> On Fri, 2006-05-26 at 17:44 +0200, Julian Stecklina wrote:
>> Juan Jose Garcia Ripoll <lisp at arrakis.es> writes:
>> > the patch below should not be required. If the list contains objects
>> > that must be built using MAKE-LOAD-FORM then the compiler should detect
>> > it. Otherwise, one setf statement per array element is an overkill.
>> >
>> > Can you show me a code that breaks with the current version?
>> 
>> See below. [...]
>> init is not declared. But you could return nil as second value. But this
>> has another problem, when the array in question references it self. When
>> you compile and load the following example, (aref *blub* 1) will be 0,
>> which is clearly wrong. The struct in the array is needed, because
>> otherwise this code path would not be executed.
>
> 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?

What do you mean with just using a constant list? The patch moves the
constant list from the creation form to the initialization form. It does
not look to me as if it is making the code worse at all.

Regards,
-- 
Julian Stecklina

Being really good at C++ is like being really good at using rocks to
sharpen sticks. - Thant Tessman




More information about the ecl-devel mailing list