values of *print-case* could cause invalid output, due to
some internal special variables of the printer not being bound
thread-locally (reported by Max Mikhanosha)
+ * fixed bug: SPECIALIZER metaobjects (including anonymous classes
+ and EQL-SPECIALIZERs) can be used as specializers to DEFMETHOD.
+ (reported by Pascal Costanza)
* minor code generation optimizations:
* better register allocation in CLOS dispatching functions
* overflow detection when coercing signed bytes to fixnums on x86-64
;; SB-KERNEL:INSTANCE. In an effort to sweep such
;; problems under the rug, we exclude these problem
;; cases by blacklisting them here. -- WHN 2001-01-19
- '(slot-object))
+ (list 'slot-object #+nil (find-class 'slot-object)))
'(ignorable))
((not (eq *boot-state* 'complete))
;; KLUDGE: PCL, in its wisdom, sometimes calls methods with
;; second argument.) Hopefully it only does this kind of
;; weirdness when bootstrapping.. -- WHN 20000610
'(ignorable))
+ ((typep specializer 'eql-specializer)
+ `(type (eql ,(eql-specializer-object specializer)) ,parameter))
((var-globally-special-p parameter)
;; KLUDGE: Don't declare types for global special variables
;; -- our rebinding magic for SETQ cases don't work right
;; least #.(find-class 'integer) and integer as equivalent
;; specializers with this.
(let* ((specializer (if (and (typep specializer 'class)
- (eq specializer (find-class (class-name specializer))))
+ (let ((name (class-name specializer)))
+ (and name (symbolp name)
+ (eq specializer (find-class name nil)))))
(class-name specializer)
specializer))
(kind (info :type :kind specializer)))
(defclass foo () ())
(reinitialize-instance (find-class 'foo) :name '(a b))
\f
+;;; classes (including anonymous ones) and eql-specializers should be
+;;; allowed to be specializers.
+(defvar *anonymous-class*
+ (make-instance 'standard-class
+ :direct-superclasses (list (find-class 'standard-object))))
+(defvar *object-of-anonymous-class*
+ (make-instance *anonymous-class*))
+(eval `(defmethod method-on-anonymous-class ((obj ,*anonymous-class*)) 41))
+(assert (eql (method-on-anonymous-class *object-of-anonymous-class*) 41))
+(eval `(defmethod method-on-anonymous-class
+ ((obj ,(intern-eql-specializer *object-of-anonymous-class*)))
+ 42))
+(assert (eql (method-on-anonymous-class *object-of-anonymous-class*) 42))
+\f
;;;; success
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.14.22"
+"0.9.14.23"