+
+328: "Profiling generic functions", transplanted from #241
+ (from tonyms on #lisp IRC 2003-02-25)
+ In sbcl-0.7.12.55, typing
+ (defclass foo () ((bar :accessor foo-bar)))
+ (profile foo-bar)
+ (unintern 'foo-bar)
+ (defclass foo () ((bar :accessor foo-bar)))
+ gives the error message
+ "#:FOO-BAR already names an ordinary function or a macro."
+
+ Problem: when a generic function is profiled, it appears as an ordinary
+ function to PCL. (Remembering the uninterned accessor is OK, as the
+ redefinition must be able to remove old accessors from their generic
+ functions.)
+
+329: "Sequential class redefinition"
+ reported by Bruno Haible:
+ (defclass reactor () ((max-temp :initform 10000000)))
+ (defvar *r1* (make-instance 'reactor))
+ (defvar *r2* (make-instance 'reactor))
+ (slot-value *r1* 'max-temp)
+ (slot-value *r2* 'max-temp)
+ (defclass reactor () ((uptime :initform 0)))
+ (slot-value *r1* 'uptime)
+ (defclass reactor () ((uptime :initform 0) (max-temp :initform 10000)))
+ (slot-value *r1* 'max-temp) ; => 10000
+ (slot-value *r2* 'max-temp) ; => 10000000 oops...
+
+ Possible solution:
+ The method effective when the wrapper is obsoleted can be saved
+ in the wrapper, and then to update the instance just run through
+ all the old wrappers in order from oldest to newest.
+
+331: "lazy creation of CLOS classes for user-defined conditions"
+ (defstruct foo)
+ (defstruct (bar (:include foo)))
+ (sb-mop:class-direct-subclasses (find-class 'foo))
+ returns NIL, rather than a singleton list containing the BAR class.
+
+332: "fasl stack inconsistency in structure redefinition"
+ (reported by Tim Daly Jr sbcl-devel 2004-05-06)
+ Even though structure redefinition is undefined by the standard, the
+ following behaviour is suboptimal: running
+ (defun stimulate-sbcl ()
+ (let ((filename (format nil "/tmp/~A.lisp" (gensym))))
+ ;;create a file which redefines a structure incompatibly
+ (with-open-file (f filename :direction :output :if-exists :supersede)
+ (print '(defstruct astruct foo) f)
+ (print '(defstruct astruct foo bar) f))
+ ;;compile and load the file, then invoke the continue restart on
+ ;;the structure redefinition error
+ (handler-bind ((error (lambda (c) (continue c))))
+ (load (compile-file filename)))))
+ (stimulate-sbcl)
+ and choosing the CONTINUE restart yields the message
+ debugger invoked on a SB-INT:BUG in thread 27726:
+ fasl stack not empty when it should be
+
+333: "CHECK-TYPE TYPE-ERROR-DATUM place"
+ (reported by Tony Martinez sbcl-devel 2004-05-23)
+ When CHECK-TYPE signals a TYPE-ERROR, the TYPE-ERROR-DATUM holds the
+ lisp symbolic place in question rather than the place's value. This
+ seems wrong.
+
+334: "COMPUTE-SLOTS used to add slots to classes"
+ (reported by Bruno Haible sbcl-devel 2004-06-01)
+ a. Adding a local slot does not work:
+ (use-package "SB-PCL")
+ (defclass b (a) ())
+ (defmethod compute-slots ((class (eql (find-class 'b))))
+ (append (call-next-method)
+ (list (make-instance 'standard-effective-slot-definition
+ :name 'y
+ :allocation :instance))))
+ (defclass a () ((x :allocation :class)))
+ ;; A should now have a shared slot, X, and a local slot, Y.
+ (mapcar #'slot-definition-location (class-slots (find-class 'b)))
+ yields
+ There is no applicable method for the generic function
+ #<STANDARD-GENERIC-FUNCTION CLASS-SLOTS (3)>
+ when called with arguments
+ (NIL).
+
+ b. Adding a class slot does not work:
+ (use-package "SB-PCL")
+ (defclass b (a) ())
+ (defmethod compute-slots ((class (eql (find-class 'b))))
+ (append (call-next-method)
+ (list (make-instance 'standard-effective-slot-definition
+ :name 'y
+ :allocation :class))))
+ (defclass a () ((x :allocation :class)))
+ ;; A should now have two shared slots, X and Y.
+ (mapcar #'slot-definition-location (class-slots (find-class 'b)))
+ yields
+ There is no applicable method for the generic function
+ #<STANDARD-GENERIC-FUNCTION SB-PCL::CLASS-SLOT-CELLS (1)>
+ when called with arguments
+ (NIL).
+
+336: "slot-definitions must retain the generic functions of accessors"
+ reported by Tony Martinez:
+ (defclass foo () ((bar :reader foo-bar)))
+ (defun foo-bar (x) x)
+ (defclass foo () ((bar :reader get-bar))) ; => error, should work
+
+ Note: just punting the accessor removal if the fdefinition
+ is not a generic function is not enough:
+
+ (defclass foo () ((bar :reader foo-bar)))
+ (defvar *reader* #'foo-bar)
+ (defun foo-bar (x) x)
+ (defclass foo () ((bar :initform 'ok :reader get-bar)))
+ (funcall *reader* (make-instance 'foo)) ; should be an error, since
+ ; the method must be removed
+ ; by the class redefinition
+
+ Fixing this should also fix a subset of #328 -- update the
+ description with a new test-case then.