X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefbangstruct.lisp;h=7b9ba18776eee2825101945d44d6a2b408aaf773;hb=df679ed627975948b1cee190f4d79c397588c43e;hp=db3965a1d23393d345bdcfd7a79eaa25517605e3;hpb=4eb1a6d3ad2b7dcc19ac0ec979a1eb1eb049659a;p=sbcl.git diff --git a/src/code/defbangstruct.lisp b/src/code/defbangstruct.lisp index db3965a..7b9ba18 100644 --- a/src/code/defbangstruct.lisp +++ b/src/code/defbangstruct.lisp @@ -76,8 +76,8 @@ (defun just-dump-it-normally (object &optional (env nil env-p)) (declare (type structure!object object)) (if env-p - (make-load-form-saving-slots object :environment env) - (make-load-form-saving-slots object))) + (sb!xc:make-load-form-saving-slots object :environment env) + (sb!xc:make-load-form-saving-slots object))) ;;; a MAKE-LOAD-FORM function for objects which don't use the load ;;; form system. This is used for LAYOUT objects because the special @@ -104,7 +104,7 @@ ;; 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 @@ -118,6 +118,7 @@ (if (consp nameoid) (values (first nameoid) (rest nameoid)) (values nameoid nil)) + (declare (type list options)) (let* ((include-clause (find :include options :key #'first)) (def!struct-supertype nil) ; may change below (mlff-clause (find :make-load-form-fun options :key #'first)) @@ -144,11 +145,11 @@ (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)) @@ -158,8 +159,8 @@ (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))