1.0.31.4: misuse of ABORT-IR1-TRANSFORM
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 11 Sep 2009 14:49:34 +0000 (14:49 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 11 Sep 2009 14:49:34 +0000 (14:49 +0000)
 Should have been GIVE-UP-IR1-TRANSFORM.

NEWS
src/pcl/fixup.lisp
tests/compiler.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 3197559..680e22f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ changes relative to sbcl-1.0.31
   * bug fix: SAVE-LISP-AND-DIE option :SAVE-RUNTIME-OPTIONS did not work
     correctly when starting from an executable core without saved runtime
     options (reported by Faré Rideau, thanks to Zach Beane)
+  * bug fix: (SETF SLOT-VALUE) signalled a warning which should have been
+    an optimization note instead. (reported by Martin Cracauer)
 
 changes in sbcl-1.0.31 relative to sbcl-1.0.30:
   * improvement: stack allocation is should now be possible in all nested
index a43c5e6..20ec346 100644 (file)
@@ -74,6 +74,6 @@
                   ;; Safe code wants to check the type, and the global
                   ;; accessor won't do that. Also see the comment in the
                   ;; compiler-macro.
-                  (abort-ir1-transform "cannot use optimized accessor in safe code")
+                  (give-up-ir1-transform "cannot use optimized accessor in safe code")
                   `(sb-pcl::accessor-set-slot-value object ',c-slot-name new-value))))
         (give-up-ir1-transform "slot name is not an interned symbol"))))
index 5d3c463..34ae4a8 100644 (file)
                                         (type double-float r))
                                (list q r))))))
     (assert (equal (funcall fun 1.0d0) '(1 0.0d0)))))
+
+(with-test (:name :set-slot-value-no-warning)
+  (let ((notes 0))
+    (handler-bind ((warning #'error)
+                   (sb-ext:compiler-note (lambda (c)
+                                           (declare (ignore c))
+                                           (incf notes))))
+      (compile nil `(lambda (x y)
+                      (declare (optimize speed safety))
+                      (setf (slot-value x 'bar) y))))
+    (assert (= 1 notes))))
index 7329149..5251bed 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.31.3"
+"1.0.31.4"