0.7.13.pcl-class.8
authorChristophe Rhodes <csr21@cam.ac.uk>
Sun, 23 Mar 2003 17:25:06 +0000 (17:25 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Sun, 23 Mar 2003 17:25:06 +0000 (17:25 +0000)
Let CLASS objects be dumpable
... MAKE-LOAD-FORM method from Gerd Moellmann

TODO.pcl-class
src/pcl/defs.lisp
version.lisp-expr

index c196c1c..92b5fb6 100644 (file)
@@ -3,19 +3,6 @@
 [ fixed the (CLASS-PROTOTYPE (FIND-CLASS 'NULL)) issue; more general
   fix for other built-in-classes can be done in mainline post-merge ]
 
-** SB-MOP
-
-Now that a CL:CLASS is a real CLOS class, it might be worth giving
-SB-PCL the SB-MOP nickname, since it now is in the region of
-conforming to AMOP.
-
-** LEGAL-CLASS-NAME-P
-
-NIL is probably not a legal class name.  Hmm, except that 
-  (FIND-CLASS NIL NIL) 
-still probably doesn't want to be an error (ASDF executes this
-internally, for a start).
-
 ** DOCUMENTATION/DESCRIBE-OBJECT
 
 Can be done post-merge, but some of these methods talk about
index 9b4bb43..515a222 100644 (file)
     :initform nil
     :reader class-predicate-name)))
 
+(def!method make-load-form ((class class) &optional env)
+  ;; FIXME: should we not instead pass ENV to FIND-CLASS?  Probably
+  ;; doesn't matter while all our environments are the same...
+  (declare (ignore env))
+  (let ((name (class-name class)))
+    (unless (and name (eq (find-class name nil) class))
+      (error "~@<Can't use anonymous or undefined class as constant: ~S~:@>"
+            class))
+    `(find-class ',name)))
+
 ;;; The class PCL-CLASS is an implementation-specific common
 ;;; superclass of all specified subclasses of the class CLASS.
 (defclass pcl-class (class)
index 1761dd7..384d694 100644 (file)
@@ -18,4 +18,4 @@
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
 
-"0.7.13.pcl-class.7"
+"0.7.13.pcl-class.8"