0.8alpha.0.21:
[sbcl.git] / src / code / defbangstruct.lisp
index bcde0b5..7b9ba18 100644 (file)
   ;; DEF!STRUCT is made to work fully, this list is processed, then
   ;; made unbound, and should no longer be used.
   (defvar *delayed-def!structs* nil))
-(eval-when (:compile-toplevel :load-toplevel :execute)
+(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute)
   ;; Parse the arguments for a DEF!STRUCT call, and return
   ;;   (VALUES NAME DEFSTRUCT-ARGS MAKE-LOAD-FORM-FUN DEF!STRUCT-SUPERTYPE),
   ;; where NAME is the name of the new type, DEFSTRUCT-ARGS is the
 (progn
   (defun %instance-length (instance)
     (aver (typep instance 'structure!object))
-    (layout-length (class-layout (sb!xc:find-class (type-of instance)))))
+    (layout-length (classoid-layout (find-classoid (type-of instance)))))
   (defun %instance-ref (instance index)
     (aver (typep instance 'structure!object))
-    (let* ((class (sb!xc:find-class (type-of instance)))
-          (layout (class-layout class)))
+    (let* ((class (find-classoid (type-of instance)))
+          (layout (classoid-layout class)))
       (if (zerop index)
          layout
          (let* ((dd (layout-info layout))
            (funcall accessor-name instance)))))
   (defun %instance-set (instance index new-value)
     (aver (typep instance 'structure!object))
-    (let* ((class (sb!xc:find-class (type-of instance)))
-          (layout (class-layout class)))
+    (let* ((class (find-classoid (type-of instance)))
+          (layout (classoid-layout class)))
       (if (zerop index)
          (error "can't set %INSTANCE-REF FOO 0 in cross-compilation host")
          (let* ((dd (layout-info layout))