Christophe
Weblog
Wiki
Code
Publications
Music
projects
/
specializable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0ffa125
)
flush the EMF cache in REINITIALIZE-INSTANCE of SPECIALIZABLE-GENERIC-FUNCTION
author
Christophe Rhodes
<csr21@cantab.net>
Thu, 12 Dec 2013 14:54:06 +0000
(14:54 +0000)
committer
Christophe Rhodes
<csr21@cantab.net>
Thu, 12 Dec 2013 14:54:06 +0000
(14:54 +0000)
specializable.lisp
patch
|
blob
|
history
diff --git
a/specializable.lisp
b/specializable.lisp
index 29ad9260ff1f2d78abc78879e0e50902013081dc..979f51476cb01d41b4709c77409b458955bdd0df 100644
(file)
--- a/
specializable.lisp
+++ b/
specializable.lisp
@@
-112,7
+112,7
@@
;;; FIXME: in some kind of order, the discriminating function needs to handle:
;;; - argument count checking;
;;; - keyword argument validity;
;;; 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))
;;; - flushing the cache on class redefinition;
;;; - cache thread-safety.
(defmethod sb-mop:compute-discriminating-function ((gf specializable-generic-function))
@@
-124,6
+124,9
@@
(sb-pcl::invoke-emf emfun args)
(slow-method-lookup gf args generalizers)))))
(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)
(defun slow-method-lookup (gf args generalizers)
;; differs from closette
(multiple-value-bind (applicable-methods definitivep)