[M3devel] small objects

hendrik at topoi.pooq.com hendrik at topoi.pooq.com
Wed Apr 8 05:42:26 CEST 2009


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.

-- 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