[Vm-dev] byteSizeOf bug?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Jan 13 22:51:49 UTC 2010


On 2010-01-13, at 10:20 AM, Eliot Miranda wrote:

> BTW, there's clearly an exception for format = 7 which is supposed to be 64-bit longs.  So lengthOf:baseheader:format: looks wrong for 64-bit images.  It needs to say something like
> 
> 	fmt <= 4
> 		ifTrue: [ ^ (sz - BaseHeaderSize) >> ShiftForWord "words"].
> 	fmt = 7
> 		ifTrue: [ ^ (sz - BaseHeaderSize) >> 3 "64-bit longs"].
> 	fmt < 8
> 		ifTrue: [ ^ (sz - BaseHeaderSize) >> 2 "32-bit longs"]
> 		ifFalse: [ ^ (sz - BaseHeaderSize) - (fmt bitAnd: 3) "bytes"]
> 
> or format = 7 needs to be documented as being unused.


The work to add longer immediate integer types, floats,  wasn't done so no-doubt that fmt = 7 *would* be used for something. 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>   Twitter:  squeaker68882
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20100113/04e1b272/attachment.htm


More information about the Vm-dev mailing list