[Vm-dev] Suspect code in LittleEndianBitmap
Bob Arning
arning315 at comcast.net
Sat Nov 2 22:51:36 UTC 2013
Looks a bit odd. If byte is less than zero, then exit. Followed by
another test for byte less than zero? Looks like old and new code mixed.
Cheers,
Bob
On 11/2/13 6:30 PM, Nicolas Cellier wrote:
>
>
>
> In recent COG, I see:
>
> LittleEndianBitmap>>byteAt: byteAddress put: byte
> "Insert a byte into a Bitmap (little-endian version). N.B.
> Signedness will be lost since byteAt: answers non-negative values.
> We can add a signedByteAt: if needed."
> | value longWord shift lowBits longAddr |
> (byte < 0 or:[byte > 255]) ifTrue:[^self errorImproperStore].
> value := byte < 0
> ifTrue: [byte < 128 ifTrue:
> [self errorImproperStore].
>
> It looks suspect to me, wouldn't the intention be
>
> ifTrue: [byte < -128 ifTrue:
> [self errorImproperStore].
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20131102/f09a927b/attachment.htm
More information about the Vm-dev
mailing list