[Ecls-list] make-load-form fix

Juan Jose Garcia Ripoll lisp at arrakis.es
Fri May 26 00:39:05 UTC 2006


Hi Julian,

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?

Juanjo

On Fri, 2006-05-26 at 05:17 +0200, Julian Stecklina wrote:
> RCS file: /project/ecl/cvsroot/ecl/src/clos/print.lsp,v
> retrieving revision 1.11
> diff -u -r1.11 print.lsp
> --- src/clos/print.lsp  17 May 2006 15:17:29 -0000      1.11
> +++ src/clos/print.lsp  26 May 2006 02:42:04 -0000
> @@ -79,10 +79,11 @@
>        (array
>         (values `(make-array ',(array-dimensions object)
>                  :element-type ',(array-element-type object)
> -                :adjustable ',(adjustable-array-p object)
> -                :initial-contents ',(loop for i from 0 below
> (array-total-size object)
> -                                          collect (row-major-aref
> object i)))
> -              init))
> +                :adjustable ',(adjustable-array-p object))
> +              `(loop for i from 0 below ,(array-total-size object)
> +                     for v in ',(loop for i from 0 below
> (array-total-size object)
> +                                      collect (row-major-aref object
> i))
> +                     do (setf (row-major-aref ,(maybe-quote object)
> i) v))))
>        (cons
>         (values `(cons ,(maybe-quote (car object)) nil)
>                (and (rest object) `(rplacd ,(maybe-quote
> object) ,(maybe-quote (cdr object))))))
-------------- 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/20060526/8d0da1a3/attachment.sig>


More information about the ecl-devel mailing list