X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fwrapper.lisp;h=1e8b2f83b9d67f54c2256e7fd67ac8ac482b1dd8;hb=bfb19d306581ac86feb4371846c4b9953d692dd8;hp=f8dc323d9b8865a4dadc8724bd9704dccf9f967f;hpb=8fee0ba99cd1b1038072bd3fc8f5d5338d80d2de;p=sbcl.git diff --git a/src/pcl/wrapper.lisp b/src/pcl/wrapper.lisp index f8dc323..1e8b2f8 100644 --- a/src/pcl/wrapper.lisp +++ b/src/pcl/wrapper.lisp @@ -156,27 +156,32 @@ (let* ((owrapper (wrapper-of instance)) (state (layout-invalid owrapper))) (aver (not (eq state :uninitialized))) - (etypecase state - (null owrapper) - ;; FIXME: I can't help thinking that, while this does cure the - ;; symptoms observed from some class redefinitions, this isn't - ;; the place to be doing this flushing. Nevertheless... -- - ;; CSR, 2003-05-31 - ;; - ;; CMUCL comment: - ;; We assume in this case, that the :INVALID is from a - ;; previous call to REGISTER-LAYOUT for a superclass of - ;; INSTANCE's class. See also the comment above - ;; FORCE-CACHE-FLUSHES. Paul Dietz has test cases for this. - ((member t) - (force-cache-flushes (class-of instance)) - (check-wrapper-validity instance)) - (cons - (ecase (car state) - (:flush - (flush-cache-trap owrapper (cadr state) instance)) - (:obsolete - (obsolete-instance-trap owrapper (cadr state) instance))))))) + (cond ((not state) + owrapper) + ((not (layout-for-std-class-p owrapper)) + ;; Obsolete structure trap. + (obsolete-instance-trap owrapper nil instance)) + ((eq t state) + ;; FIXME: I can't help thinking that, while this does cure + ;; the symptoms observed from some class redefinitions, + ;; this isn't the place to be doing this flushing. + ;; Nevertheless... -- CSR, 2003-05-31 + ;; + ;; CMUCL comment: + ;; We assume in this case, that the :INVALID is from a + ;; previous call to REGISTER-LAYOUT for a superclass of + ;; INSTANCE's class. See also the comment above + ;; FORCE-CACHE-FLUSHES. Paul Dietz has test cases for this. + (force-cache-flushes (class-of instance)) + (check-wrapper-validity instance)) + ((consp state) + (ecase (car state) + (:flush + (flush-cache-trap owrapper (cadr state) instance)) + (:obsolete + (obsolete-instance-trap owrapper (cadr state) instance)))) + (t + (bug "Invalid LAYOUT-INVALID: ~S" state))))) (declaim (inline check-obsolete-instance)) (defun check-obsolete-instance (instance)