:LOAD-TOPLEVEL context; this appears to decrease fasl sizes by
approximately 10%.
* fixed some bugs revealed by Paul Dietz' test suite:
+ ** Fixed an optimization bug related to inheritance of initforms
+ from local to shared slots.
** FILE-POSITION works as specified on BROADCAST-STREAMs.
** CAST optimizer forgot to flush argument derived type.
** print/read consistency on floats is now orders of magnitude
;; (section 5.5.2 of AMOP).
(update-slots class (compute-slots class))
(update-gfs-of-class class)
- (update-inits class (compute-default-initargs class))
+ (update-initargs class (compute-default-initargs class))
(update-ctors 'finalize-inheritance :class class))
(unless finalizep
(dolist (sub (class-direct-subclasses class)) (update-class sub nil))))
(update-gf-dfun class gf))
gf-table)))))
-(defun update-inits (class inits)
+(defun update-initargs (class inits)
(setf (plist-value class 'default-initargs) inits))
\f
(defmethod compute-default-initargs ((class slot-class))
(from-class (slot-definition-allocation-class eslotd))
(cell (assq name (class-slot-cells from-class))))
(aver (consp cell))
- cell))))
+ (if (eq +slot-unbound+ (cdr cell))
+ ;; We may have inherited an initfunction
+ (let ((initfun (slot-definition-initfunction eslotd)))
+ (if initfun
+ (rplacd cell (funcall initfun))
+ cell))
+ cell)))))
(initialize-internal-slot-functions eslotd))))
(defmethod compute-slots ((class funcallable-standard-class))
(assert (= (slot-value (make-instance 'definitargs-class) 'a) 1))
(assert (= (slot-value (make-instance 'definitargs-class :a 0) 'a) 0))
(assert (= *definitargs-counter* 2))
+
+;;; inherited local -> shared slot initforms
+;; (adapted from Paul F. Dietz's test suite DEFCLASS-0211.1)
+(defclass shared-to-local-initform-super ()
+ ((redefined :allocation :instance :initform 'orig-initform)))
+(defclass shared-to-local-initform-sub (shared-to-local-initform-super)
+ ((redefined :allocation :class)))
+(assert (slot-boundp (make-instance 'shared-to-local-initform-sub) 'redefined))
+(assert (eq 'orig-initform
+ (slot-value (make-instance 'shared-to-local-initform-sub) 'redefined)))
\f
;;; success
(sb-ext:quit :unix-status 104)
\ No newline at end of file
;;; 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.8.10.31"
+"0.8.10.32"