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

Florin Mateoc florin.mateoc at gmail.com
Sat Jan 11 22:12:10 UTC 2014


On 1/11/2014 4:26 PM, Colin Putney wrote:
>
>
>
> On Sat, Jan 11, 2014 at 12:05 PM, Bert Freudenberg <bert at freudenbergs.de <mailto:bert at freudenbergs.de>> wrote:
>  
>
>     ... which is when you got the 0. Or are you asking why we need the sentinel? Because if aBlock keeps allocating
>     objects, we would never reach the end.
>
>
> According to the comment in #allObjectsDo: we need the sentinel because the *execution* of aBlock will allocate an
> object - the activation context. So regardless of what aBlock actually does, we need the sentinel to avoid an infinite
> loop.
>
> However, this bug causes the loop to skip over the sentinel. If the comment is right, we should end up in an infinite
> loop. But we don't, we eventually get 0. Why?
>
> Colin 
>
>

It does not skip over the sentinel. It encounters the "end" earlier because you create a new object after the sentinel
was created.
If you do Object new nextObject you get 0. So when the proxy is materialized and then gets sent nextObject it returns 0

Florin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140111/cf972be4/attachment.htm


More information about the Squeak-dev mailing list