[Vm-dev] VM Maker: VMMaker-tpr.335.mcz

Eliot Miranda eliot.miranda at gmail.com
Tue Jan 7 02:38:09 UTC 2014


On Sun, Jan 5, 2014 at 1:06 PM, tim Rowledge <tim at rowledge.org> wrote:

>
>
> On 05-01-2014, at 1:01 PM, Nicolas Cellier <
> nicolas.cellier.aka.nice at gmail.com> wrote:
>
> > ? so the goal was not to limit dx2 and dy2 in interval [-2.0,2.0] ?
>
> Uuuh… maybe. It really doesn’t matter much since the prim isn’t used, but
> I suppose it ought to be correct
>

But the correct code would indeed be

(a) (dx2 < -2) ifTrue: [dx2 := -2].
(dx2 >  2) ifTrue: [dx2 := 2].
(dy2 < -2) ifTrue: [dy2 := -2].
(dy2 >  2) ifTrue: [dy2 := 2].

*not*
(b) (dx2<2) ifTrue: [dx2 := -2].
(dx2>2) ifTrue: [dx2 := 2].
(dy2<2) ifTrue: [dy2 := -2].
(dy2>2) ifTrue: [dy2 := 2].

i.e. the problem is just that dx2<-2 is ambiguous, it could mean dx2 <- 2
(new binary selector rules) or dx2 < -2 (the intended).  I juts committed
your fix but I think it's wrong.  It should be (a).  I'm going to change
it.  Forgive me :-)


> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: IAM: Increase Amperage Above Maximum
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20140106/a5218dc5/attachment.htm


More information about the Vm-dev mailing list