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

Erik Huelsmann ehuelsmann at common-lisp.net
Fri May 29 06:08:36 UTC 2009


Author: ehuelsmann
Date: Fri May 29 02:08:26 2009
New Revision: 11962

Log:
Revert r11958: it breaks a number of ANSI tests.

Found by: Peter Tsenter (ptsenter at hotmail)

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	Fri May 29 02:08:26 2009
@@ -6188,8 +6188,18 @@
 value for use with derive-type-minus and derive-type-plus.")
 
 (define-int-bounds-derivation - (low1 high1 low2 high2)
-  (values (and low1 high2 (- low1 high2))
-          (and high1 low2 (- high2 low2))))
+  (values (when (and low1 high2) ;; low1 or high2 undefined: no lower bound
+            (if low2
+                (min (- low1 low2)
+                     (- low1 high2))
+                ;; low2 undefined: no effect on lower bound
+                (- low1 high2)))
+          (when (and high1 low2) ;; high1 or low2 undefined: no upper bound
+            (if high2
+                (max (- high1 low2)
+                     (- high1 high2))
+                ;; high2 undefined: no effect on upper bound
+                (- high1 low2)))))
 
 (defun derive-compiler-types (args op)
   (flet ((combine (x y)




More information about the armedbear-cvs mailing list