[M3devel] small objects
Mika Nystrom
mika at async.caltech.edu
Wed Apr 8 05:51:24 CEST 2009
hendrik at topoi.pooq.com writes:
>On Wed, Apr 08, 2009 at 12:26:57PM +1000, Tony Hosking wrote:
>>
>> I'm not sure that we are seeing any semantic changes at all. And with
>> Mika's definition of SmallInteger.T as a "boxed" INTEGER object
>> (actually it would be a subrange for values that fit into
>> BITSIZE(Word.T)-1 bits), it is essentially transparent. It just
>> happens to be a run-time optimization that unboxes the INTEGER value.
>
>You should also be able to box a CARDINAL. Isn't that a subrange of
>integers that can be encoded in the right bit width? Hardwarewise, it
>would be decoded with a logical shift instead of an arithmetic shift.
I think you can do either, but not both... a REFANY containing
0xffffffff stands for either the boxed CARDINAL 2,147,483,647 or
the boxed INTEGER -1. It can't really be both... I think INTEGERs
are more useful, since you can get [0..2^30-1] in there?
>
>-- hendrik
>
>P.S. Apologies for the word "Hardwarewise". It's late here, and I
>don't have enough brain left for both English and technical content.
>
>-- hendrik
More information about the M3devel
mailing list