X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fseqtran.lisp;h=2699964568f975ba43d318d8111878074fa44fdc;hb=f68aae04c952d9e9749c0f7cc8cf3768e82f15a8;hp=a3126da6b8cdffe82a680d6c2b24e77195701e4e;hpb=8cbd7fc0f27222a778ce61bae7d943a5081362cc;p=sbcl.git diff --git a/src/compiler/seqtran.lisp b/src/compiler/seqtran.lisp index a3126da..2699964 100644 --- a/src/compiler/seqtran.lisp +++ b/src/compiler/seqtran.lisp @@ -890,10 +890,15 @@ ((<= i ,src-offset)) (declare (optimize (insert-array-bounds-checks 0))) (setf (aref ,dst (1- i)) (aref ,src (1- i)))) - `(do ((i (+ ,src-offset ,length) (1- i)) + ;; KLUDGE: The compiler is not able to derive that (+ offset + ;; length) must be a fixnum, but arrives at (unsigned-byte 29). + ;; We, however, know it must be so, as by this point the bounds + ;; have already been checked. + `(do ((i (truly-the fixnum (+ ,src-offset ,length)) (1- i)) (j (+ ,dst-offset ,length) (1- j))) ((<= i ,src-offset)) - (declare (optimize (insert-array-bounds-checks 0))) + (declare (optimize (insert-array-bounds-checks 0)) + (type (integer 0 #.sb!xc:array-dimension-limit) j i)) (setf (aref ,dst (1- j)) (aref ,src (1- i)))))) (deftransform subseq ((seq start &optional end)