[Vm-dev] positive32BitValueOf: fail with LargePositiveInteger

Igor Stasenko siguctua at gmail.com
Sat Oct 9 20:49:48 UTC 2010


On 9 October 2010 23:28, stephane ducasse <stephane.ducasse at gmail.com> wrote:
>
> Why do you all think that mariano is not trying to learn?
> He is! He read all the chapters available and books on the topics.
> Now may be tell him simply that he is an idiot.
> This would be more efficient. But Mariano is a really smart guy so may be
> we can also tell him to do ruby or python and we can stay in our nice little
> club or we can consider that learning alone is difficult.
>

I could say, that even if you know something well, you still not
guaranteed from making silly mistakes.
This happens often , especially in such hard area as VM development.


> Stef
>
>>> Hi. I am trying to call #primitiveBitOr which inside calls #popPos32BitInteger which calls  #positive32BitValueOf , with two LargePositiveInteger. Example:
>>>
>>> 9999999999 bitOr: 8888888888.
>>>
>>> Now, this seems to fail since the #bitOr: of LargePositiveInteger is failing, and thus, super (Integer) is being used. Now, I don't understand why it fails.
>>
>> Because 9999999999 does not fit into 32 bits.
>>
>>> So....I don't understand...how can I have a LargePositiveInteger but that is less than 32 bits?  Wouldn't that be a SmallInteger?
>>
>> SmallIntegers are 31 bits. Positive SmallIntegers are 30 bits:
>>
>>       SmallInteger maxVal
>>               1073741823
>>
>> You *really* should start learning about the Squeak VM basics first.
>>
>> - Bert -
>>
>>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list