From: Nikodemus Siivola Date: Thu, 11 Oct 2007 15:33:55 +0000 (+0000) Subject: 1.0.10.45: save typecheck-function in slot-table even if location is not saved X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=b7de68f093163fc29296afd9b3089ae11a5d5132;p=sbcl.git 1.0.10.45: save typecheck-function in slot-table even if location is not saved * Otherwise non-standard metaclasses for which optimized instance accessors can be used don't get the typecheck-fun from the wrapper in the function returned from MAKE-OPTIMIZED-STD-WRITER-FUNCTION. * Test-case. * Missing NEWS entry for .44. --- diff --git a/NEWS b/NEWS index 7421548..0447527 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,11 @@ changes in sbcl-1.0.11 relative to sbcl-1.0.10: * bug fix: symbol-macro expansion now uses the *MACROEXPAND-HOOK* as specified by the CLHS. (thanks to Tobias Rittweiler) * bug fix: NaN comparison now works on x86-64. + * bug fix: CLOSE :ABORT T on a stream with pending output now + works. + * bug fix: instances of non-standard metaclasses using standard + instance structure protocol sometimes missed the slot type checks + in safe code. changes in sbcl-1.0.10 relative to sbcl-1.0.9: * minor incompatible change: the MSI installer on Windows no longer diff --git a/src/pcl/slots-boot.lisp b/src/pcl/slots-boot.lisp index 0514bf5..b2b1f21 100644 --- a/src/pcl/slots-boot.lisp +++ b/src/pcl/slots-boot.lisp @@ -588,7 +588,7 @@ (eq metaclass *the-class-funcallable-standard-class*)))))) (save-type-check-function-p (unless bootstrap - (and save-slot-location-p (safe-p class))))) + (and (eq 'complete *boot-state*) (safe-p class))))) (flet ((add-to-vector (name slot) (declare (symbol name) (optimize (sb-c::insert-array-bounds-checks 0))) diff --git a/tests/clos-typechecking.impure.lisp b/tests/clos-typechecking.impure.lisp index f72cb67..87b7602 100644 --- a/tests/clos-typechecking.impure.lisp +++ b/tests/clos-typechecking.impure.lisp @@ -231,4 +231,14 @@ (make-instance 'a :slot1 (lambda () 1)) (make-instance 'b :slot1 (lambda () 1))) - +(with-test (:name :alternate-metaclass/standard-instance-structure-protocol) + (defclass my-alt-metaclass (standard-class) ()) + (defmethod sb-mop:validate-superclass ((class my-alt-metaclass) superclass) + t) + (defclass my-alt-metaclass-instance-class () + ((slot :type fixnum :initarg :slot)) + (:metaclass my-alt-metaclass)) + (defun make-my-instance (class) + (make-instance class :slot :not-a-fixnum)) + (assert (raises-error? (make-my-instance 'my-alt-metaclass-instance-class) + type-error))) diff --git a/version.lisp-expr b/version.lisp-expr index a90afb9..e7ea859 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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".) -"1.0.10.44" +"1.0.10.45"