Changeset 14143


Ignore:
Timestamp:
09/01/12 21:00:49 (9 years ago)
Author:
ehuelsmann
Message:

Close #189: Fix thinko in MIN and MAX return value type derivation.

Location:
trunk/abcl
Files:
2 edited

Legend:

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

    r14121 r14143  
    52485248(define-int-bounds-derivation max (low1 low2 high1 high2)
    52495249  (values (or (when (and low1 low2) (max low1 low2)) low1 low2)
    5250           (or (when (and high1 high2) (max high1 high2)) high1 high2)))
     5250          ; if either maximum is unbound, their maximum is unbound
     5251          (when (and high1 high2) (max high1 high2))))
    52515252
    52525253(declaim (ftype (function (t) t) derive-type-max))
     
    52575258
    52585259(define-int-bounds-derivation min (low1 high1 low2 high2)
    5259   (values (or (when (and low1 low2) (min low1 low2)) low1 low2)
     5260  (values (when (and low1 low2) (min low1 low2))
     5261          ; if either minimum is unbound, their minimum is unbound
    52605262          (or (when (and high1 high2) (min high1 high2)) high1 high2)))
    52615263
  • trunk/abcl/test/lisp/abcl/compiler-tests.lisp

    r13539 r14143  
    474474
    475475
    476 
    477 
    478 
    479        
    480 
    481        
    482        
     476;;; ticket #189
     477(deftest compiler.3
     478    (eql (funcall (compile nil (lambda (a)
     479                           (declare (type unsigned-byte a))
     480                           (max 28105919 a 1016934843)))
     481                  10545160975)
     482         10545160975)
     483  t)
     484
Note: See TracChangeset for help on using the changeset viewer.