[Vm-dev] VM Maker: VMMaker.oscog-eem.1429.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Tue Aug 11 06:45:11 UTC 2015


2015-08-11 2:08 GMT+02:00 Eliot Miranda <eliot.miranda at gmail.com>:

>
> Hi Nicolas,
>
> On Aug 10, 2015, at 1:32 PM, Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com> wrote:
>
> Hum, but then wait, see suspicious code below
>
>
> [snip]
>
>
>>>> Item was changed:
>>>>   ----- Method: SimpleStackBasedCogit>>genPrimitiveLessThan (in
>>>> category 'primitive generators') -----
>>>>   genPrimitiveLessThan
>>>> +       ^self
>>>> +               genSmallIntegerComparison: JumpLess
>>>> +               orDoubleComparison: #JumpFPGreaterOrEqual:
>>>>
>>>> and shouldn't it be JumpFPGreater ???
>
>
> No.  (a>b) = !(b>=a); (a>b) != !(b>a) if a = b.
>
>
Hi Eliot,
it seems that you are mixing the two algorithms, the old one and the new one

(a < b) = ( a >= b) not
is wrong and doesn't work with NaN
it was the old implementation which inverted < into >=

(a < b) = (b > a)
is OK and is what you implemented now by reverting the parameters
so < must be inverted in >

look again and test with 2 <= 2.0

cheers

Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150811/2975acf1/attachment.htm


More information about the Vm-dev mailing list