1.0.10.45: save typecheck-function in slot-table even if location is not saved
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 11 Oct 2007 15:33:55 +0000 (15:33 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 11 Oct 2007 15:33:55 +0000 (15:33 +0000)
 * 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.

NEWS
src/pcl/slots-boot.lisp
tests/clos-typechecking.impure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 7421548..0447527 100644 (file)
--- 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
index 0514bf5..b2b1f21 100644 (file)
                       (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)))
index f72cb67..87b7602 100644 (file)
   (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)))
index a90afb9..e7ea859 100644 (file)
@@ -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"