[armedbear-cvs] r12935 - in trunk/abcl: src/org/armedbear/lisp test/lisp/abcl

Erik Huelsmann ehuelsmann at common-lisp.net
Sat Oct 2 07:36:11 UTC 2010


Author: ehuelsmann
Date: Sat Oct  2 03:36:08 2010
New Revision: 12935

Log:
Fix #107: Incorrect compilation of (SETF STRUCTURE-REF) expansion.

Modified:
   trunk/abcl/src/org/armedbear/lisp/setf.lisp
   trunk/abcl/test/lisp/abcl/misc-tests.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/setf.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/setf.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/setf.lisp	Sat Oct  2 03:36:08 2010
@@ -240,4 +240,6 @@
 
 (defsetf function-info %set-function-info)
 
-(defsetf stream-external-format %set-stream-external-format)
\ No newline at end of file
+(defsetf stream-external-format %set-stream-external-format)
+
+(defsetf structure-ref structure-set)

Modified: trunk/abcl/test/lisp/abcl/misc-tests.lisp
==============================================================================
--- trunk/abcl/test/lisp/abcl/misc-tests.lisp	(original)
+++ trunk/abcl/test/lisp/abcl/misc-tests.lisp	Sat Oct  2 03:36:08 2010
@@ -96,3 +96,16 @@
   (read-from-string "(1 2 #+nil #k(3 4))")
   (1 2)
   19)
+
+;; executed of the compiled expression below
+;; resulted in an error on pre-0.23 versions
+(defstruct mystruct slot)
+(deftest ticket.107
+    (funcall (compile nil
+                      '(lambda ()
+                         (let ((struct (make-mystruct))
+                               x)
+                           (setf (values (mystruct-slot struct)
+                                         x)
+                                 (values 42 2))))))
+  42 2)
\ No newline at end of file




More information about the armedbear-cvs mailing list