parent 939cb805
......@@ -5249,7 +5249,7 @@ for use with derive-type-times.")
one-integer-type
(derive-compiler-types args op))))
(define-int-bounds-derivation max (low1 low2 high1 high2)
(define-int-bounds-derivation max (low1 high1 low2 high2)
(values (or (when (and low1 low2) (max low1 low2)) low1 low2)
; if either maximum is unbound, their maximum is unbound
(when (and high1 high2) (max high1 high2))))
......
......@@ -61,6 +61,10 @@
low
high)
(defmethod print-object ((type integer-type) stream)
(print-unreadable-object (type stream :type t :identity t)
(format stream "~D ~D" (integer-type-low type) (integer-type-high type))))
(defconstant +fixnum-type+ (%make-integer-type most-negative-fixnum
most-positive-fixnum))
......
......@@ -475,5 +475,9 @@
:args (nil)
:results 0)
(define-compiler-test math.max.1
(lambda (a b)
(declare (type (integer * 6488318769) b))
(max 1 (the (integer * 5711538578) a) b 2 1351352470))
:args (5711538444 6488318765)
:results 6488318765)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment