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

Mark Evenson mevenson at common-lisp.net
Sun Mar 27 10:50:57 UTC 2011


Author: mevenson
Date: Sun Mar 27 06:50:56 2011
New Revision: 13257

Log:
Fix compilation of LOGAND for args that could possibly be nil.

Fixes ticket #142.

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	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Sun Mar 27 06:50:56 2011
@@ -4408,9 +4408,9 @@
                 (emit 'iand)
                 (convert-representation :int representation)
                 (emit-move-from-stack target representation))
-               ((or (and (fixnum-type-p type1)
+               ((or (and (fixnum-type-p type1) (member type2 '(:long :int))
                          (compiler-subtypep type1 'unsigned-byte))
-                    (and (fixnum-type-p type2)
+                    (and (fixnum-type-p type2) (member type1 '(:long :int))
                          (compiler-subtypep type2 'unsigned-byte)))
                 ;; One of the arguments is a positive fixnum.
                 (with-operand-accumulation
@@ -4429,9 +4429,9 @@
                 (emit 'land)
                 (convert-representation :long representation)
                 (emit-move-from-stack target representation))
-               ((or (and (java-long-type-p type1)
+               ((or (and (java-long-type-p type1) (member type2 '(:long :int))
                          (compiler-subtypep type1 'unsigned-byte))
-                    (and (java-long-type-p type2)
+                    (and (java-long-type-p type2) (member type1 '(:long :int))
                          (compiler-subtypep type2 'unsigned-byte)))
                 ;; One of the arguments is a positive long.
                 (with-operand-accumulation




More information about the armedbear-cvs mailing list