[Newbies] FFI, pragma and co...

Damien Cassou damien.cassou at laposte.net
Mon Aug 21 16:29:00 UTC 2006


cdrick wrote:
> (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 ?

The computer optimize some calls by inlining the method code (I don't 
know for #@). If this is the case, the code of #@ is directly written 
into your method and the original code is never executed.

But again, I don't know if this your problem, just an idea


More information about the Beginners mailing list