X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fseq.lisp;h=50eec6bfc78a3d170d13529b9baea9463cf4d667;hb=15d6e7c9a2c3234f95dfe278046fa2fee1b0c007;hp=777ee4a0c17c3138d086b815edf84e20400dab1a;hpb=e3f68bde025bd0602cf554e1eaf5935aaa74662a;p=sbcl.git diff --git a/src/code/seq.lisp b/src/code/seq.lisp index 777ee4a..50eec6b 100644 --- a/src/code/seq.lisp +++ b/src/code/seq.lisp @@ -275,8 +275,9 @@ (cons (cond ((eq (car type) 'string) `(vector character ,@(cdr type))) ((eq (car type) 'simple-string) - `(simple-array character ,@(when (cdr type) - (list (cdr type))))) + `(simple-array character ,(if (cdr type) + (cdr type) + '(*)))) (t type))) (t type))) (type (specifier-type adjusted-type))) @@ -472,6 +473,8 @@ (1- source-index))) ((= target-index (the fixnum (1- target-start))) target-sequence) (declare (fixnum target-index source-index)) + ;; disable bounds checking + (declare (optimize (safety 0))) (setf (aref target-sequence target-index) (aref source-sequence source-index)))) (do ((target-index target-start (1+ target-index)) @@ -480,6 +483,8 @@ (= source-index (the fixnum source-end))) target-sequence) (declare (fixnum target-index source-index)) + ;; disable bounds checking + (declare (optimize (safety 0))) (setf (aref target-sequence target-index) (aref source-sequence source-index))))) @@ -1544,7 +1549,7 @@ (declare (fixnum index)) (setq splice (cdr (rplacd splice (list (car current))))) (setq current (cdr current))) - (do ((index 0 (1+ index))) + (do ((index start (1+ index))) ((or (and end (= index (the fixnum end))) (atom current))) (declare (fixnum index)) @@ -2002,7 +2007,7 @@ (simple-base-string (frob2)) (t (vector*-frob sequence)))) (declare (type (or index null) p)) - (values f (and p (the index (+ p offset)))))))))) + (values f (and p (the index (- p offset)))))))))) (defun %find-position (item sequence-arg from-end start end key test) (macrolet ((frob (sequence from-end) `(%find-position item ,sequence