From: Christophe Rhodes Date: Fri, 4 Apr 2003 14:24:51 +0000 (+0000) Subject: 0.pre8.37: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=ef1534f00fcf9d5554a91c70485b4ede40fdcb4f;p=sbcl.git 0.pre8.37: Fix forward-referenced DEFCLASS bug (reported by Paul Dietz on cmucl-imp 2003-04-02) ... pass initargs to CHANGE-CLASS (thanks to Gerd Moellmann) --- diff --git a/NEWS b/NEWS index f3bb6da..ab3967c 100644 --- a/NEWS +++ b/NEWS @@ -1623,6 +1623,11 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 * incompatible change: the SB-PCL package should now be considered a private implementation detail, and no longer a semi-private MOP interface. + * minor incompatible change: due to rearrangement for threads, the + control stack and binding stack are now allocated at arbitrary + addresses instead of being hardcoded per-port. Users affected by + this probably have to be doing advanced things with shared + libraries, and will know who they are. * known functions, which cannot be open coded by backend, are considered to be able to check types of their arguments. (reported by Nathan J. Froyd) @@ -1635,6 +1640,10 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 specified-by-AMOP order of (CLASS NAME &REST ARGS &KEY). * fixed bug 20: DEFMETHOD can define methods using names that are not the proper names of classes to designate class specializers. + * Experimental native threads support, on x86 Linux. This is not + compiled in by default: you need to add :SB-THREAD to the target + features. See the "Beyond ANSI" chapter of the manual for + details. * fixed some bugs revealed by Paul Dietz' test suite: ** COPY-ALIST now signals an error if its argument is a dotted list; @@ -1643,14 +1652,9 @@ changes in sbcl-0.8.0 relative to sbcl-0.7.14 ** the USE-VALUE, CONTINUE and STORE-VALUE functions now correctly exclude restarts of the same name associated with a different condition; - * Experimental native threads support, on x86 Linux. This is not - compiled in by default: you need to add :SB-THREAD to the target - features. See the "Beyond ANSI" chapter of the manual for - details. - * Due to rearrangement for threads, the control stack and binding stack - are now allocated at arbitrary addresses instead of being hardcoded - per-port. Users affected by this probably have to be doing - advanced things with shared libraries, and will know who they are + ** DEFCLASS of forward-referenced classes with another + forward-referenced class in the superclasses list no longer + causes an error; planned incompatible changes in 0.8.x: * (not done yet, but planned:) When the profiling interface settles diff --git a/src/pcl/std-class.lisp b/src/pcl/std-class.lisp index 12d3ecb..a8f2cce 100644 --- a/src/pcl/std-class.lisp +++ b/src/pcl/std-class.lisp @@ -341,7 +341,8 @@ (defmethod ensure-class-using-class ((class pcl-class) name &rest args &key) (multiple-value-bind (meta initargs) (ensure-class-values class args) - (unless (eq (class-of class) meta) (change-class class meta)) + (unless (eq (class-of class) meta) + (apply #'change-class class meta initargs)) (apply #'reinitialize-instance class initargs) (setf (find-class name) class) (set-class-type-translation class name) diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index f0f7cc3..22dc62b 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -176,8 +176,16 @@ ;;; that it doesn't happen again. ;;; ;;; First, the forward references: -(defclass a (b) ()) -(defclass b () ()) +(defclass forward-ref-a (forward-ref-b) ()) +(defclass forward-ref-b () ()) +;;; (a couple more complicated examples found by Paul Dietz' test +;;; suite): +(defclass forward-ref-c1 (forward-ref-c2) ()) +(defclass forward-ref-c2 (forward-ref-c3) ()) + +(defclass forward-ref-d1 (forward-ref-d2 forward-ref-d3) ()) +(defclass forward-ref-d2 (forward-ref-d4 forward-ref-d5) ()) + ;;; Then change-class (defclass class-with-slots () ((a-slot :initarg :a-slot :accessor a-slot) diff --git a/version.lisp-expr b/version.lisp-expr index 7140e84..3571f6a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -18,4 +18,4 @@ ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.pre8.36" +"0.pre8.37"