Prevent a make-array transform from modifying source forms.
authorStas Boukarev <stassats@gmail.com>
Sat, 2 Mar 2013 20:54:34 +0000 (00:54 +0400)
committerStas Boukarev <stassats@gmail.com>
Sat, 2 Mar 2013 20:54:34 +0000 (00:54 +0400)
That causes repeated compilations of inlined functions to accumulate
changes made by the transform.

Thanks to Bart Botta.
(regression since 1.0.42.11-bis)

NEWS
src/compiler/array-tran.lisp

diff --git a/NEWS b/NEWS
index ca2919b..5ff7f27 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,9 @@
 ;;;; -*- coding: utf-8; fill-column: 78 -*-
+changes relative to sbcl-1.1.5:
+  * bug fix: Prevent a make-array transform from modifying source forms
+    causing problems for inlined code. Thanks to Bart Botta.
+   (regression since 1.0.42.11-bis)
+
 changes in sbcl-1.1.5 relative to sbcl-1.1.4:
   * minor incompatible change: SB-SPROF:WITH-PROFILING no longer loops
     by default.
index baf1b98..02c5c37 100644 (file)
                    (values dimensions nil))))
         (let ((initial-contents (getf keyargs :initial-contents)))
           (when (and initial-contents rank)
-            (setf (getf keyargs :initial-contents)
+            (setf keyargs (copy-list keyargs)
+                  (getf keyargs :initial-contents)
                   (rewrite-initial-contents rank initial-contents env))))
         `(locally (declare (notinline list vector))
            (make-array ,new-dimensions ,@keyargs)))))