[Newbies] FFI, pragma and co...

cdrick cdrick65 at gmail.com
Mon Aug 21 14:18:54 UTC 2006


>
> look at @
> the point creation method is sped up using an optional primitive call.
>
> @ y
>         "Primitive. Answer a Point whose x value is the receiver and whose
> y
>         value is the argument. Optional. No Lookup. See Object
> documentation
>         whatIsAPrimitive."
>
>         <primitive: 18>
>         ^Point x: self y: y


(a) Time millisecondsToRun:[50000 timesRepeat: [1 at 1]]  ->  12

then I commentet the primitive call to see the diffirence in Number>>@
and I saw no difference...
so I put a self halt in @

and the method isn't stopped when I redo (a).

but if I do that in a worspace:

|a|
a := 1. self halt.
Time millisecondsToRun:[50000 timesRepeat: [1@(a+1)]].

It stops and then the halt in #@ works ok ...

any idea of what I did wrong ?

Thanks
Cédrick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20060821/3debaa08/attachment.htm


More information about the Beginners mailing list