From: Christophe R. <cr...@us...> - 2003-07-27 15:24:16
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv14328/tests Modified Files: compiler.pure.lisp Log Message: 0.8.2.4: As reported by pfdietz sbcl-devel 2003-07-27, MAKE-SEQUENCE, MERGE and CONCATENATE weren't inferring their return type aggressively enough when given VECTOR as the type specifier. Index: compiler.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/compiler.pure.lisp,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- compiler.pure.lisp 18 Jul 2003 05:47:23 -0000 1.51 +++ compiler.pure.lisp 27 Jul 2003 15:24:12 -0000 1.52 @@ -446,8 +446,8 @@ (declare (notinline mapcar)) (1+ (mapcar #'print '(1 2 3))))))) -;; bug found by Paul Dietz: (SETF AREF) for bit vectors with constant -;; index was effectless +;;; bug found by Paul Dietz: (SETF AREF) for bit vectors with constant +;;; index was effectless (let ((f (compile nil '(lambda (a v) (declare (type simple-bit-vector a) (type bit v)) (declare (optimize (speed 3) (safety 0))) @@ -463,7 +463,7 @@ (declare (type (simple-array (simple-string 3) (5)) x)) (aref (aref x 0) 0)))) -;; compiler failure +;;; compiler failure (let ((f (compile nil '(lambda (x) (typep x '(not (member 0d0))))))) (assert (funcall f 1d0))) @@ -472,7 +472,7 @@ (let ((y (* x pi))) (atan y y)))) -;; bogus optimization of BIT-NOT +;;; bogus optimization of BIT-NOT (multiple-value-bind (result x) (eval '(let ((x (eval #*1001))) (declare (optimize (speed 2) (space 3)) @@ -480,3 +480,14 @@ (values (bit-not x nil) x))) (assert (equal x #*1001)) (assert (equal result #*0110))) + +;;; the VECTOR type in CONCATENATE/MERGE/MAKE-SEQUENCE means (VECTOR T). +(handler-bind ((sb-ext:compiler-note #'error)) + (assert (equalp (funcall + (compile + nil + '(lambda () + (let ((x (make-sequence 'vector 10 :initial-element 'a))) + (setf (aref x 4) 'b) + x)))) + #(a a a a b a a a a a)))) |