1.0.8.25: refactor CAN-OPTIMIZE-ACCESS usage and interface
[sbcl.git] / src / pcl / low.lisp
index 1a1be86..0949623 100644 (file)
@@ -66,8 +66,9 @@
                       ;; default of WRAPPER-INVALID. Instead of trying
                       ;; to find out, I just overrode the LAYOUT
                       ;; default here. -- WHN 19991204
-                      (invalid nil))
-            (:conc-name %wrapper-)
+                      (invalid nil)
+                      ;; This allows quick testing of wrapperness.
+                      (for-std-class-p t))
             (:constructor make-wrapper-internal)
             (:copier nil))
   (instance-slots-layout nil :type list)
   (when (pcl-instance-p instance)
     (get-slots instance)))
 
-(defmacro built-in-or-structure-wrapper (x) `(layout-of ,x))
-
 (defmacro get-wrapper (inst)
   (once-only ((wrapper `(wrapper-of ,inst)))
     `(progn
 
 ;;; The definition of STRUCTURE-TYPE-P was moved to early-low.lisp.
 
-(defun get-structure-dd (type)
-  (layout-info (classoid-layout (find-classoid type))))
-
 (defun structure-type-included-type-name (type)
-  (let ((include (dd-include (get-structure-dd type))))
+  (let ((include (dd-include (find-defstruct-description type))))
     (if (consp include)
         (car include)
         include)))
 (defun structure-type-slot-description-list (type)
   (nthcdr (length (let ((include (structure-type-included-type-name type)))
                     (and include
-                         (dd-slots (get-structure-dd include)))))
-          (dd-slots (get-structure-dd type))))
+                         (dd-slots (find-defstruct-description include)))))
+          (dd-slots (find-defstruct-description type))))
 
 (defun structure-slotd-name (slotd)
   (dsd-name slotd))
 
 (defun structure-slotd-writer-function (type slotd)
   (if (dsd-read-only slotd)
-      (let ((dd (get-structure-dd type)))
+      (let ((dd (find-defstruct-description type)))
         (coerce (slot-setter-lambda-form dd slotd) 'function))
       (fdefinition `(setf ,(dsd-accessor-name slotd)))))