* bug fix: improve the detection and resolution of MOP metacycles
(where effective method computation depends on the generic function
having its effective method computed). (reported by Bruno Haible)
+ * bug fix: pass the right initargs to :BEFORE or :AFTER methods on
+ SHARED-INITIALIZE or INITIALIZE-INSTANCE in optimized
+ MAKE-INSTANCE constructors. (reported by Axel Schairer for cmucl)
* optimization: in taking the GCD of bignums, reduce the two bignums
to approximately the same size (using Euclid's algorithm) before
applying the more sophisticated binary GCD. (thanks to Juho
;;; Utilities *******
;;; ******************
+(defun quote-plist-keys (plist)
+ (loop for (key . more) on plist by #'cddr
+ if (null more) do
+ (error "Not a property list: ~S" plist)
+ else
+ collect `(quote ,key)
+ and collect (car more)))
+
(defun plist-keys (plist &key test)
(loop for (key . more) on plist by #'cddr
if (null more) do
(slot-inits (slot-init-forms ctor (or ii-before si-before))))
(values
`(let (,@(when (or ii-before ii-after)
- `((.ii-args. (list .instance. ,@initargs))))
+ `((.ii-args.
+ (list .instance. ,@(quote-plist-keys initargs)))))
,@(when (or si-before si-after)
- `((.si-args. (list .instance. t ,@initargs)))))
+ `((.si-args.
+ (list .instance. t ,@(quote-plist-keys initargs))))))
,@(loop for method in ii-before
collect `(invoke-method ,method .ii-args.))
,@(loop for method in si-before
(declare (ignore x)) (setq y 'foo)))
(style-warning (c) (error c)))
\f
+;;; from Axel Schairer on cmucl-imp 2004-08-05
+(defclass class-with-symbol-initarg ()
+ ((slot :initarg slot)))
+(defmethod initialize-instance :after
+ ((x class-with-symbol-initarg) &rest initargs &key &allow-other-keys)
+ (unless (or (null initargs)
+ (eql (getf initargs 'slot)
+ (slot-value x 'slot)))
+ (error "bad bad bad")))
+(defun make-thing (arg)
+ (make-instance 'class-with-symbol-initarg 'slot arg))
+(defun make-other-thing (slot arg)
+ (make-instance 'class-with-symbol-initarg slot arg))
+(assert (eql (slot-value (make-thing 1) 'slot) 1))
+(assert (eql (slot-value (make-other-thing 'slot 2) 'slot) 2))
+\f
;;; success
(sb-ext:quit :unix-status 104)
;;; 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.13.29"
+"0.8.13.30"