1.0.32.27: Add test case for 1.0.32.26.
authortrittweiler <trittweiler>
Thu, 12 Nov 2009 10:42:50 +0000 (10:42 +0000)
committertrittweiler <trittweiler>
Thu, 12 Nov 2009 10:42:50 +0000 (10:42 +0000)
NEWS
tests/compiler.test.sh
version.lisp-expr

diff --git a/NEWS b/NEWS
index b49af39..f96f318 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,7 @@ changes relative to sbcl-1.0.32:
   * bug fix: give CLISP a hint about a type declaration to enable it to build
     the cross-compiler without warnings.  (thanks to Josh Elasser; launchpad
     bug #396597)
+  * bug fix: correctly dump literal objects in defaulting forms of arglists.
 
 changes in sbcl-1.0.32 relative to sbcl-1.0.31:
   * optimization: faster FIND and POSITION on strings of unknown element type
index 6a816df..57a37a4 100644 (file)
@@ -405,5 +405,41 @@ cat > $tmpfilename <<EOF
 EOF
 expect_clean_cload $tmpfilename
 
+# Test correct fasl-dumping of literals in arglist defaulting.
+# (LP Bug #310132)
+cat > $tmpfilename <<EOF
+(in-package :cl-user)
+
+;; These are CLHS examples from the dictionary entry for MAKE-LOAD-FORM.
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defstruct my-struct a b c)
+  (defmethod make-load-form ((s my-struct) &optional environment)
+    (make-load-form-saving-slots s :environment environment))
+  (defclass my-class ()
+    ((x :initarg :x :reader obj-x)
+     (y :initarg :y :reader obj-y)
+     (dist :accessor obj-dist)))
+  (defmethod make-load-form ((self my-class) &optional environment)
+    (make-load-form-saving-slots self
+                                 :slot-names '(x y)
+                                 :environment environment)))
+
+(defun bar1 (&optional (x #.(make-my-struct)))
+  x)
+
+(defun bar2 (&optional (x #.(make-instance 'my-class)))
+  x)
+
+;; Packages are externalizable.
+(defun bar3 (&optional (x #.*package*))
+  x)
+
+(assert (typep (bar1) 'my-struct))
+(assert (typep (bar2) 'my-class))
+(assert (eq (bar3) *package*))
+
+EOF
+expect_clean_cload $tmpfilename
+
 # success
 exit $EXIT_TEST_WIN
index 4ab56a6..4cd032c 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.32.26"
+"1.0.32.27"