X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fgeneric%2Fvm-tran.lisp;h=7031de38919acc1fcc89d5b09132181525f0ec7c;hb=cd2c70c8b5d4dcc62b968f5a9bedd3c9c8698e82;hp=80b162364fb7d5c05c13b3372520d71fa923243d;hpb=ad1aa2961d81ed8db9dac59068c6861199c29a3a;p=sbcl.git diff --git a/src/compiler/generic/vm-tran.lisp b/src/compiler/generic/vm-tran.lisp index 80b1623..7031de3 100644 --- a/src/compiler/generic/vm-tran.lisp +++ b/src/compiler/generic/vm-tran.lisp @@ -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))))) @@ -124,14 +125,15 @@ (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) ;;;