Christophe Weblog Wiki Code Publications Music
fix one package export
[specializable.git] / specializable.lisp
index 29ad9260ff1f2d78abc78879e0e50902013081dc..2c8ebc5864c2b9a4381d1e100405471a1db64bf3 100644 (file)
@@ -8,7 +8,7 @@
   (:export "SPECIALIZABLE-GENERIC-FUNCTION" "SPECIALIZABLE-METHOD"
            "EXTENDED-SPECIALIZER"
 
-           "SPECIALIZER-ACCEPTS-P" "SPECIALIZER-ACCEPTS-CLASS-P"
+           "SPECIALIZER-ACCEPTS-P" "SPECIALIZER-ACCEPTS-GENERALIZER-P"
            "SPECIALIZER<"
 
            "GENERALIZER-OF-USING-CLASS"
 ;;; FIXME: in some kind of order, the discriminating function needs to handle:
 ;;; - argument count checking;
 ;;; - keyword argument validity;
-;;; - flushing the emf cache on method addition/removal
+;;; - DONE flushing the emf cache on method addition/removal
 ;;; - flushing the cache on class redefinition;
 ;;; - cache thread-safety.
 (defmethod sb-mop:compute-discriminating-function ((gf specializable-generic-function))
          (sb-pcl::invoke-emf emfun args)
          (slow-method-lookup gf args generalizers)))))
 
+(defmethod reinitialize-instance :after ((gf specializable-generic-function) &key)
+  (clrhash (emf-table gf)))
+
 (defun slow-method-lookup (gf args generalizers)
   ;; differs from closette
   (multiple-value-bind (applicable-methods definitivep)