[git] CMU Common Lisp branch master updated. snapshot-2013-09-8-gc01e6f9

Raymond Toy rtoy at common-lisp.net
Sat Sep 21 22:08:00 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".

The branch, master has been updated
       via  c01e6f9d9be67e4aedb33857a00f8d20697a19ef (commit)
      from  eee2366d1dd68701aa210dd62e2319e5e50b631a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c01e6f9d9be67e4aedb33857a00f8d20697a19ef
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Sat Sep 21 15:07:44 2013 -0700

    Make :plus-integer actually print + or - as documented.
    
    The comment says the field should be proceeded with a + or -, but
    depended on negative integers producing the needed -.  When
    disassembling with a radix, this doesn't produce the expected output
    (#x7 vs #x-7 vs -#x7). So really print + or - followed by the absolute
    value.

diff --git a/src/compiler/disassem.lisp b/src/compiler/disassem.lisp
index 1316aa2..762b77b 100644
--- a/src/compiler/disassem.lisp
+++ b/src/compiler/disassem.lisp
@@ -952,13 +952,14 @@
 	((eq (car source) :plus-integer)
 	 ;; prints the given field proceed with a + or a -
 	 (let ((form
-		(arg-value-form (arg-or-lose (cadr source) funstate)
-				funstate
-				:numeric)))
+		 (arg-value-form (arg-or-lose (cadr source) funstate)
+				 funstate
+				 :numeric)))
 	   `(progn
-	      (when (>= ,form 0)
-		(local-write-char #\+))
-	      (local-princ ,form))))
+	      (if (>= ,form 0)
+		  (local-write-char #\+)
+		  (local-write-char #\-))
+	      (local-princ (abs ,form)))))
 	((eq (car source) 'quote)
 	 `(local-princ ,source))
 	((eq (car source) 'function)

-----------------------------------------------------------------------

Summary of changes:
 src/compiler/disassem.lisp |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp



More information about the cmucl-cvs mailing list