Update of /cvsroot/sbcl/sbcl/src/code
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30917/src/code
188.8.131.52: potential CLOS GC safety issue
* EMIT-FETCH-WRAPPER needs to emit code that checks that it has a
real standard instance (as opposed to a structure) before it can
pull the slots: if the structure eg. has no slots at all we would
be pulling garbage into a lisp variable, which is not good (TM),
though it should be non-serious on GENCGC platforms.
To make this fast we add a new slot to LAYOUT: FOR-STD-CLASS-P,
which is always NIL for layouts, and T for wrappers.
* Remove one redundant SET-DFUN, which may have been needed in long-gone
days when cache vectors were resourced, but not anymore.
RCS file: /cvsroot/sbcl/sbcl/src/code/class.lisp,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- class.lisp 28 May 2007 15:16:23 -0000 1.76
+++ class.lisp 29 May 2007 14:36:23 -0000 1.77
@@ -185,7 +185,16 @@
;; This slot is known to the C runtime support code.
(n-untagged-slots 0 :type index)
;; Definition location
- (source-location nil))
+ (source-location nil)
+ ;; True IFF the layout belongs to a standand-instance or a
+ ;; standard-funcallable-instance -- that is, true only if the layout
+ ;; is really a wrapper.
+ ;; FIXME: If we unify wrappers and layouts this can go away, since
+ ;; it is only used in SB-PCL::EMIT-FETCH-WRAPPERS, which can then
+ ;; use INSTANCE-SLOTS-LAYOUT instead (if there is are no slot
+ ;; layouts, there are no slots for it to pull.)
+ (for-std-class-p nil :type boolean :read-only t))
(def!method print-object ((layout layout) stream)
(print-unreadable-object (layout stream :type t :identity t)