<div dir="ltr"><br><div class="gmail_extra">That diff is a bit hard to read, so here&#39;s the implementation:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">
allObjectsDo: aBlock </div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>&quot;Evaluate the argument, aBlock, for each object in the system </div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>excluding SmallIntegers. New objects created by aBlock will </div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>be included in the enumeration, and it is up to the caller to avoid</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>creating new objects faster than they are enumerated. It&#39;s</div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>important that the next object is fetched before the block is </div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>evaluated, because the block may use #become: to change the</div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>identity of object.&quot;</div><div class="gmail_extra"><br></div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>| object nextObject |</div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>object := self someObject.</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>[nextObject := object nextObject.</div><div class="gmail_extra">
<span class="" style="white-space:pre">        </span>aBlock value: object.</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>object := nextObject.</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>0 == nextObject]</div>
<div class="gmail_extra"><span class="" style="white-space:pre">                </span>whileFalse.</div><div><br></div><div><br></div><div>This version has the following properties:</div><div><br></div><div>- objects created inside the block will be enumerated<br>
</div><div><div>- callers may use become inside the block</div></div><div>- callers must avoid infinite loop</div><div><br></div><div>I think these are the most desirable semantics for #allObjectsDo:. However, the risk with this implementation is that it will execute an infinite loop on VMs that create a new context object for each block activation. Cog and the StackVM don&#39;t, but John&#39;s Mac VM 5.7.4.1 does, according to a quick test I just did. I don&#39;t know what the behaviour of older Window and Linux VMs are.  </div>
<div><br></div><div>So  the question is, what VMs are we planning to support for in 4.5, and do they recycle activation contexts?</div><div><br></div><div>Colin</div></div></div>