X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fseq.lisp;h=d37da2c4196a2eda6f7506c86cfd632d6ee253d2;hb=f3491f128307938cc56367f739b8fbf9e5d503b6;hp=6f4ba71bc1553344ca917755c8c01c46a7e90a56;hpb=9c71b0ad73bd4597d3130553bfbe70c172fe0501;p=sbcl.git diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 6f4ba71..d37da2c 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -296,17 +296,18 @@ "Return a sequence of the given TYPE and LENGTH, with elements initialized to INITIAL-ELEMENT." (declare (fixnum length)) - (let* ((adjusted-type - (typecase type + (let* ((expanded-type (typexpand type)) + (adjusted-type + (typecase expanded-type (atom (cond - ((eq type 'string) '(vector character)) - ((eq type 'simple-string) '(simple-array character (*))) + ((eq expanded-type 'string) '(vector character)) + ((eq expanded-type 'simple-string) '(simple-array character (*))) (t type))) (cons (cond - ((eq (car type) 'string) `(vector character ,@(cdr type))) - ((eq (car type) 'simple-string) - `(simple-array character ,(if (cdr type) - (cdr type) + ((eq (car expanded-type) 'string) `(vector character ,@(cdr expanded-type))) + ((eq (car expanded-type) 'simple-string) + `(simple-array character ,(if (cdr expanded-type) + (cdr expanded-type) '(*)))) (t type))) (t type))) @@ -877,7 +878,8 @@ (macrolet ((def (name element-type) `(defun ,name (&rest sequences) (declare (dynamic-extent sequences) - (optimize speed)) + (optimize speed) + (optimize (sb!c::insert-array-bounds-checks 0))) (let* ((lengths (mapcar #'length sequences)) (result (make-array (the integer (apply #'+ lengths)) :element-type ',element-type))