[FIX] SmallInteger class comment Revised

David N. Smith (IBM) dnsmith at watson.ibm.com
Mon Sep 10 19:25:23 UTC 2001


Fixing a bug in the comment. I must have run out of fingers when trying to compute 1 billion...

At 17:28 -0400 9/9/01, David N. Smith (IBM) wrote:
>This was once submitted as a [BUG] and with no [FIX].
>
>The class comment in SmallInteger states:
>
>	My instances are 30-bit numbers, stored in twos complement form. The allowable
>	range is approximately +- 1 billion (see SmallInteger minVal, maxVal).
>
>which is wrong. The virtual machine uses a one bit tag to indicate that the rest of the 32 bit object pointer is a SmallInteger which means that the instances of SmallInteger are 31-bits in length. One can also write code to check this maximum; it also indicates a 31-bit length for SmallIntegers.
>
>The comment should be fixed. Attached is code to change the comment to:
>
>	My instances are 31-bit numbers, stored in twos complement form. The allowable
>	range is approximately +- 1 billion (see SmallInteger minVal, maxVal).
>
>(This is another contribution for most trivial bug fix.)
>
>Dave
>Attachment converted: PBG3:SmallInteger Class Comment. (SIT5/SIT!) (000CD810)


-- 
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
dnsmith at watson.ibm.com
-------------- next part --------------
Skipped content of type multipart/appledouble


More information about the Squeak-dev mailing list