X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fenv.lisp;h=359ad30e3cd7e50fdce7966b9caaf59e94d389b6;hb=3d9d3088982414ca5617caf62bd37b4fecac29b6;hp=becccfaed3f78870119f5061ddb65d45d3a56dee;hpb=d5aafdd8ab6387e12bac187048ed322bc96fb79a;p=sbcl.git diff --git a/src/pcl/env.lisp b/src/pcl/env.lisp index becccfa..359ad30 100644 --- a/src/pcl/env.lisp +++ b/src/pcl/env.lisp @@ -125,40 +125,10 @@ (defmethod make-load-form ((object wrapper) &optional env) (declare (ignore env)) - (let ((pname (sb-kernel:class-proper-name (sb-kernel:layout-class object)))) + (let ((pname (classoid-proper-name + (layout-classoid object)))) (unless pname (error "can't dump wrapper for anonymous class:~% ~S" - (sb-kernel:layout-class object))) - `(sb-kernel:class-layout (cl:find-class ',pname)))) - -;;;; The following are hacks to deal with CMU CL having two different CLASS -;;;; classes. - -(defun coerce-to-pcl-class (class) - (if (typep class 'cl:class) - (or (sb-kernel:class-pcl-class class) - (find-structure-class (cl:class-name class))) - class)) - -(defmethod make-instance ((class cl:class) &rest stuff) - (apply #'make-instance (coerce-to-pcl-class class) stuff)) -(defmethod change-class (instance (class cl:class)) - (apply #'change-class instance (coerce-to-pcl-class class))) - -(macrolet ((frob (&rest names) - `(progn - ,@(mapcar #'(lambda (name) - `(defmethod ,name ((class cl:class)) - (funcall #',name - (coerce-to-pcl-class class)))) - names)))) - (frob - class-direct-slots - class-prototype - class-precedence-list - class-direct-default-initargs - class-direct-superclasses - compute-class-precedence-list - class-default-initargs class-finalized-p - class-direct-subclasses class-slots - make-instances-obsolete)) + (layout-classoid object))) + `(classoid-layout (find-classoid ',pname)))) +