<div dir="ltr">Hi Tobias,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 14, 2014 at 1:41 AM, Tobias Pape <span dir="ltr">&lt;<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 13.01.2014, at 21:56, Stefan Marr &lt;<a href="mailto:smalltalk@stefan-marr.de">smalltalk@stefan-marr.de</a>&gt; wrote:<br>
<br>
&gt; Hi Tobias:<br>
&gt;<br>
&gt; On 12 Jan 2014, at 18:47, Tobias Pape &lt;<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; I really don’t like to say it, but it seems to me, that a<br>
&gt;&gt; VM primitive (say #primAllObjectsDo:) would be apt here.<br>
&gt;&gt; • is more easy implemented by cousin VMs (say, Potato, SqueakJS,<br>
&gt;&gt; SPy/RSqueakVM, SqueakMaxine†<br>
&gt;<br>
&gt; How do you implement that efficiently in RPython, or Java?<br>
&gt; Keeping some kind of object table around?<br>
&gt;<br>
<br>
</div>Well, I have no Idea currently, but i think some #primAllObjectsDo:<br>
(or #primAllObjects, as it seems now) has IMHO less severe constraints<br>
than the #someObject/#nextObject way.<br></blockquote><div><br></div><div>I&#39;ve always thought that reentering the VI from a VM primitive, and hence being able to return to the VM primitive from arbitrary code executed in the block, would be problematic.  It&#39;s a lot of new machinery to add for one case.  Further, a GC could easily happen while executing the block.</div>
<div><br></div><div>Do you think it&#39;s easier than I&#39;m thinking?  I know for example that the VisualAge VM does something somewhat analogous for its unwind-protects (ensure: ifCurtailed:).  But neither the Squeak nor the VisualWorks VMs have anything like this; primitives always run a single contiguous sequence of instructions before either returning to Smalltalk (e.g. basicNew) or resuming Smalltalk (e.g. perform:).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 OT is one path. Manual heap scanning another. Collecting objects from<br>
the roots (special objects array) a third. All these do not require<br>
the #nextObject invariant.<br>
<br>
Best<br>
<span class="HOEnZb"><font color="#888888">        -Tobias</font></span><br></blockquote></div>-- <br>best,<div>Eliot</div>
</div></div>