0.8.20.29:
[sbcl.git] / src / code / array.lisp
index d3c09c1..4022e11 100644 (file)
                        sb!vm:*specialized-array-element-type-properties*)
                       #'> :key #'sb!vm:saetp-importance)))))
 
+;;; SUBSCRIPTS has a dynamic-extent list structure and is destroyed
 (defun %array-row-major-index (array subscripts
                                     &optional (invalid-index-error-p t))
   (declare (array array)
       t))
 
 (defun array-row-major-index (array &rest subscripts)
+  (declare (dynamic-extent subscripts))
   (%array-row-major-index array subscripts))
 
 (defun aref (array &rest subscripts)
   #!+sb-doc
   "Return the element of the ARRAY specified by the SUBSCRIPTS."
+  (declare (dynamic-extent subscripts))
   (row-major-aref array (%array-row-major-index array subscripts)))
 
 (defun %aset (array &rest stuff)
+  (declare (dynamic-extent stuff))
   (let ((subscripts (butlast stuff))
        (new-value (car (last stuff))))
     (setf (row-major-aref array (%array-row-major-index array subscripts))
 
 #!-sb-fluid (declaim (inline (setf aref)))
 (defun (setf aref) (new-value array &rest subscripts)
+  (declare (dynamic-extent subscripts))
   (declare (type array array))
   (setf (row-major-aref array (%array-row-major-index array subscripts))
        new-value))