X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Farray-tran.lisp;h=baf1b9809d92df8c8f80bc3b3ca32e43698c60a3;hb=de3bfc084239fa962ef001eaa68e5b6f4b9bbf81;hp=34d88402f2f1d0d5862350a9f2b536521a4f52b1;hpb=67a805dee41b93fa03c6e72f3d1ce3078dfe88eb;p=sbcl.git diff --git a/src/compiler/array-tran.lisp b/src/compiler/array-tran.lisp index 34d8840..baf1b98 100644 --- a/src/compiler/array-tran.lisp +++ b/src/compiler/array-tran.lisp @@ -169,6 +169,11 @@ (block nil (let ((dimensions (array-type-dimensions-or-give-up (lvar-conservative-type array)))) + ;; Might be *. (Note: currently this is never true, because the type + ;; derivation infers the rank from the call to ARRAY-IN-BOUNDS-P, but + ;; let's keep this future proof.) + (when (eq '* dimensions) + (give-up-ir1-transform "array bounds unknown")) ;; shortcut for zero dimensions (when (some (lambda (dim) (and (bound-known-p dim) (zerop dim))) @@ -180,9 +185,11 @@ (flet ((subscript-bounds (subscript) (let* ((type1 (lvar-type subscript)) (type2 (if (csubtypep type1 (specifier-type 'integer)) - (weaken-integer-type type1) + (weaken-integer-type type1 :range-only t) (give-up))) - (low (numeric-type-low type2)) + (low (if (integer-type-p type2) + (numeric-type-low type2) + (give-up))) (high (numeric-type-high type2))) (cond ((and (or (not (bound-known-p low)) (minusp low))