0.7.5.15:
[sbcl.git] / src / compiler / generic / vm-tran.lisp
index 80b1623..7031de3 100644 (file)
@@ -88,7 +88,8 @@
     (let ((element-type-specifier (type-specifier element-ctype)))
       `(multiple-value-bind (array index)
           (%data-vector-and-index array index)
-        (declare (type (simple-array ,element-type-specifier 1) array))
+        (declare (type (simple-array ,element-type-specifier 1) array)
+                 (type ,element-type-specifier new-value))
         (data-vector-set array
                          index
                          new-value)))))
                                      (simple-array t)
                                      *
                                      :important t)
-  (let* ((atype (continuation-type array))
-        (eltype (array-type-specialized-element-type atype)))
-    (when (eq eltype *wild-type*)
-      (give-up-ir1-transform
-       "specialized array element type not known at compile-time"))
-    `(if (array-header-p array)
-         (values (%array-data-vector array) index)
-         (values array index))))
+
+  ;; We do this solely for the -OR-GIVE-UP side effect, since we want
+  ;; to know that the type can be figured out in the end before we
+  ;; proceed, but we don't care yet what the type will turn out to be.
+  (upgraded-element-type-specifier-or-give-up array)
+
+  '(if (array-header-p array)
+       (values (%array-data-vector array) index)
+       (values array index)))
 
 ;;; transforms for getting at simple arrays of (UNSIGNED-BYTE N) when (< N 8)
 ;;;