<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"><<a href="mailto:Das.Linux@gmx.de" target="_blank">Das.Linux@gmx.de</a>></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 <<a href="mailto:smalltalk@stefan-marr.de">smalltalk@stefan-marr.de</a>> wrote:<br>
<br>
> Hi Tobias:<br>
><br>
> On 12 Jan 2014, at 18:47, Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br>
><br>
>> I really don’t like to say it, but it seems to me, that a<br>
>> VM primitive (say #primAllObjectsDo:) would be apt here.<br>
>> • is more easy implemented by cousin VMs (say, Potato, SqueakJS,<br>
>> SPy/RSqueakVM, SqueakMaxine†<br>
><br>
> How do you implement that efficiently in RPython, or Java?<br>
> Keeping some kind of object table around?<br>
><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'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'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's easier than I'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>