[squeak-dev] The Trunk: System-cwp.660.mcz

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun Jan 12 14:28:44 UTC 2014


2014/1/12 Colin Putney <colin at wiresong.com>

>
>
>
> On Sat, Jan 11, 2014 at 6:40 PM, Florin Mateoc <florin.mateoc at gmail.com>wrote:
>
>
>> No, by following the proxy's nextObject, we start iterating a different
>> loop than the original one (constituted by the bunch of objects just
>> created, the proxy being the oldest in the bunch) until we reach the newest
>> one among them, which will return 0.
>>
>
> I'm pretty sure there's just one loop. #allObjectsDo has one #whileFalse:
> message, and it keeps iterating until we reach 0.
>
>
>> The sentinel is there because, even if only one block activation is
>> created, we do not want to include it in the iteration, otherwise a check
>> for 0 would be good enough.
>>
>
> According to the comment Andreas wrote, the sentinel is there to prevent
> an infinite loop.
>
>
>> If you open code the loop (say [(next := next nextObject) ~= 0]
>> whileTrue: [...loop body...]) there is no block activation, so a check for
>> 0 would be enough (if we don't otherwise create new objects).
>>
>
>  There *is* a block activation, because the loop body sends #value: to
> aBlock.
>
> Colin
>
>
> Could it be an effect of recycling the same Context object in classical
VMInterpreter ?
In Stack interpreter (thus COG), that's yet another problem, the Context
instantiation can be avoided...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140112/bd012e33/attachment.htm


More information about the Squeak-dev mailing list