Changeset 15287


Ignore:
Timestamp:
05/30/20 09:59:15 (6 months ago)
Author:
Mark Evenson
Message:

The upper limit for 32 bit values is simply wrong

Fix the upper limit in the source for now, testing the failing
behavior.

Location:
trunk/abcl
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Bignum.java

    r15228 r15287  
    154154            if (minusp())
    155155              return NIL;
    156             return isLessThan(UNSIGNED_BYTE_32_MAX_VALUE) ? T : NIL;
     156            return isLessThanOrEqualTo(UNSIGNED_BYTE_32_MAX_VALUE) ? T : NIL;
    157157          }
    158158      }
  • trunk/abcl/src/org/armedbear/lisp/Lisp.java

    r15280 r15287  
    15471547    list(Symbol.UNSIGNED_BYTE, Fixnum.constants[32]);
    15481548
    1549   public static final LispObject UNSIGNED_BYTE_32_MAX_VALUE =
    1550     Bignum.getInstance(4294967296L);
     1549  public static final LispObject UNSIGNED_BYTE_32_MAX_VALUE
     1550    = Bignum.getInstance(4294967295L);
    15511551
    15521552  public static final LispObject getUpgradedArrayElementType(LispObject type)
     
    16021602                if (lower.isGreaterThanOrEqualTo(Fixnum.ZERO))
    16031603                  {
    1604                     if (lower.isLessThan(UNSIGNED_BYTE_32_MAX_VALUE))
     1604                    if (lower.isLessThanOrEqualTo(UNSIGNED_BYTE_32_MAX_VALUE))
    16051605                      {
    1606                         if (upper.isLessThan(UNSIGNED_BYTE_32_MAX_VALUE))
     1606                        if (upper.isLessThanOrEqualTo(UNSIGNED_BYTE_32_MAX_VALUE))
    16071607                          return UNSIGNED_BYTE_32;
    16081608                      }
     
    16311631                if (obj.isGreaterThanOrEqualTo(Fixnum.ZERO))
    16321632                  {
    1633                     if (obj.isLessThan(UNSIGNED_BYTE_32_MAX_VALUE))
     1633                    if (obj.isLessThanOrEqualTo(UNSIGNED_BYTE_32_MAX_VALUE))
    16341634                      return UNSIGNED_BYTE_32;
    16351635                  }
Note: See TracChangeset for help on using the changeset viewer.