[armedbear-cvs] r13220 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Sun Feb 13 21:27:48 UTC 2011


Author: ehuelsmann
Date: Sun Feb 13 16:27:48 2011
New Revision: 13220

Log:
Add REINITIALIZE-INSTANCE initargs cache.

Modified:
   trunk/abcl/src/org/armedbear/lisp/clos.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/clos.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/clos.lisp	Sun Feb 13 16:27:48 2011
@@ -744,6 +744,9 @@
 (defvar *make-instance-initargs-cache*
   (make-hash-table :test #'eq)
   "Cached sets of allowable initargs, keyed on the class they belong to.")
+(defvar *reinitialize-instance-initargs-cache*
+  (make-hash-table :test #'eq)
+  "Cached sets of allowable initargs, keyed on the class they belong to.")
 
 (defun ensure-class (name &rest all-keys &key metaclass &allow-other-keys)
   ;; Check for duplicate slots.
@@ -792,6 +795,7 @@
                  (t
                   ;; We're redefining the class.
                   (remhash old-class *make-instance-initargs-cache*)
+                  (remhash old-class *reinitialize-instance-initargs-cache*)
                   (%make-instances-obsolete old-class)
                   (setf (class-finalized-p old-class) nil)
                   (check-initargs (list #'allocate-instance
@@ -1617,7 +1621,8 @@
       ;; ### Clearly, this can be targeted much more exact
       ;; as we only need to remove the specializing class and all
       ;; its subclasses from the hash.
-      (clrhash *make-instance-initargs-cache*))
+      (clrhash *make-instance-initargs-cache*)
+      (clrhash *reinitialize-instance-initargs-cache*))
     (if gf
         (check-method-lambda-list name method-lambda-list
                                   (generic-function-lambda-list gf))
@@ -2716,7 +2721,7 @@
 (defmethod reinitialize-instance ((instance standard-object) &rest initargs)
   (check-initargs (list #'reinitialize-instance) (list* instance initargs)
                   instance () initargs
-                  nil)
+                  *reinitialize-instance-initargs-cache*)
   (apply #'shared-initialize instance () initargs))
 
 (defun std-shared-initialize (instance slot-names all-keys)




More information about the armedbear-cvs mailing list