Changeset 15037


Ignore:
Timestamp:
06/03/17 04:35:50 (3 years ago)
Author:
Mark Evenson
Message:

Fix MAX type derivation
(Olof-Joachim Frahm)

C.f. <http://abcl.org/trac/ticket/258>.

From <https://github.com/Ferada/abcl/commit/013fb56d5c5fc4d4837ffc4c67e9909db56cbabf>.

Location:
trunk/abcl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

    r15035 r15037  
    52505250      (derive-compiler-types args op))))
    52515251
    5252 (define-int-bounds-derivation max (low1 low2 high1 high2)
     5252(define-int-bounds-derivation max (low1 high1 low2 high2)
    52535253  (values (or (when (and low1 low2) (max low1 low2)) low1 low2)
    52545254          ; if either maximum is unbound, their maximum is unbound
  • trunk/abcl/src/org/armedbear/lisp/compiler-types.lisp

    r13535 r15037  
    6161  low
    6262  high)
     63
     64(defmethod print-object ((type integer-type) stream)
     65  (print-unreadable-object (type stream :type t :identity t)
     66    (format stream "~D ~D" (integer-type-low type) (integer-type-high type))))
    6367
    6468(defconstant +fixnum-type+  (%make-integer-type most-negative-fixnum
  • trunk/abcl/test/lisp/abcl/math-tests.lisp

    r15029 r15037  
    476476  :results 0)
    477477
    478 
    479      
     478(define-compiler-test math.max.1
     479    (lambda (a b)
     480      (declare (type (integer * 6488318769) b))
     481      (max 1 (the (integer * 5711538578) a) b 2 1351352470))
     482  :args (5711538444 6488318765)
     483  :results 6488318765)
Note: See TracChangeset for help on using the changeset viewer.