[armedbear-cvs] r13520 - trunk/abcl/src/org/armedbear/lisp

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Sat Aug 20 22:01:18 UTC 2011


Author: ehuelsmann
Date: Sat Aug 20 15:01:18 2011
New Revision: 13520

Log:
Fix MULTIPLE-VALUE-PROG1.10 -- compiled mode.

Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Sat Aug 20 14:55:30 2011	(r13519)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Sat Aug 20 15:01:18 2011	(r13520)
@@ -3005,6 +3005,14 @@
     (emit-push-current-thread)
     (emit-getfield +lisp-thread+ "_values" +lisp-object-array+)
     (astore values-register)
+
+    ;; we need to clear the values again:
+    ;;  some parts will consider a non-null _values array
+    ;;  by itself a legitimate return value (multiple values)
+    ;;  however, if we have a non-local return after the previous form
+    ;;  set the values array, other code may pick up the values instead
+    ;;  of the actual return code. (Fixes MULTIPLE-VALUE-PROG1.10)
+    (emit-clear-values)
     (compile-progn-body subforms nil nil)
     ;; Restore multiple values returned by first subform.
     (emit-push-current-thread)




More information about the armedbear-cvs mailing list