X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fvector.lisp;h=f75acf6c8d4fd89f26210d2e6551b5a3dfb3031d;hb=dca55270cf662763243dfc8ee207370473da2a6f;hp=e6bfa4b28a9288be43a7d5ca5ab7efacb670c449;hpb=c41cb4c87eae7b04f844dca5f7edb5086c5d2d68;p=sbcl.git diff --git a/src/pcl/vector.lisp b/src/pcl/vector.lisp index e6bfa4b..f75acf6 100644 --- a/src/pcl/vector.lisp +++ b/src/pcl/vector.lisp @@ -665,8 +665,21 @@ `(locally (declare #.*optimize-speed*) (let ((,index (pvref ,pv ,pv-offset))) (setq ,value (typecase ,index + ;; FIXME: the line marked by KLUDGE below + ;; (and the analogous spot in + ;; INSTANCE-WRITE-INTERNAL) is there purely + ;; to suppress a type mismatch warning that + ;; propagates through to user code. + ;; Presumably SLOTS at this point can never + ;; actually be NIL, but the compiler seems + ;; to think it could, so we put this here + ;; to shut it up. (see also mail Rudi + ;; Schlatte sbcl-devel 2003-09-21) -- CSR, + ;; 2003-11-30 ,@(when (or (null type) (eq type :instance)) - `((fixnum (clos-slots-ref ,slots ,index)))) + `((fixnum + (and ,slots ; KLUDGE + (clos-slots-ref ,slots ,index))))) ,@(when (or (null type) (eq type :class)) `((cons (cdr ,index)))) (t +slot-unbound+))) @@ -700,8 +713,9 @@ (let ((,index (pvref ,pv ,pv-offset))) (typecase ,index ,@(when (or (null type) (eq type :instance)) - `((fixnum (setf (clos-slots-ref ,slots ,index) - ,new-value)))) + `((fixnum (and ,slots + (setf (clos-slots-ref ,slots ,index) + ,new-value))))) ,@(when (or (null type) (eq type :class)) `((cons (setf (cdr ,index) ,new-value)))) (t ,default))))))) @@ -893,7 +907,8 @@ `(pv-env (,pv ,calls ,pv-table-symbol ,pv-parameters) (let (,@(mapcar (lambda (slot-var p) `(,slot-var (get-slots-or-nil ,p))) slot-vars pv-parameters)) - ,@body))) + (declare (ignorable ,@(mapcar #'identity slot-vars))) + ,@body))) ;;; This gets used only when the default MAKE-METHOD-LAMBDA is ;;; overridden.