<br><br><div class="gmail_quote">On Wed, Jan 12, 2011 at 1:37 AM, Josh Gargus <span dir="ltr">&lt;<a href="mailto:josh@schwa.ca">josh@schwa.ca</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>
<br>
On Jan 11, 2011, at 11:48 PM, Igor Stasenko wrote:<br>
<br>
&gt;<br>
&gt; Eliot, one thing about &#39;forwarded&#39; objects, which you calling the<br>
&gt; forwarding corpse is that it can be used not only for pinning,<br>
&gt; but also with #becomeForward primitive, making it work a lot faster,<br>
&gt; since its not require to scan whole heap to update references,<br>
&gt; and update can be done during GC.<br>
&gt; The only problem, as you pointed out, is the objects which don&#39;t have<br>
&gt; enough space for forwarding pointer. But for this case, i think the<br>
&gt; primitive can fall back and use old slow scheme.<br>
<br>
</div>I was thinking the same thing.  But wouldn&#39;t there remain the problem that Eliot mentioned about objects with named variables?<br></blockquote><div><br></div><div>You&#39;re both right.  The issue of objects with named inst vars is important (see my reply to Steve&#39;s post; performance is one issue).  One wants to do lazy become, but without imposing checking costs on operations with high dynamic frequency.  That&#39;s what&#39;s so beautiful about changing the class; it piggy-backs on the inline cache check, and moves the actual check and fix-up to a rare and expensive path, that of an inline cache miss, without imposing any extra costs on the common case of a send to a non-corpse object.  The implementtion challenge is to come up with a scheme for objects with named inst vars that doesn&#39;t add large costs to inst var access.</div>
<div><br></div><div>Since the current Cog become has to scan activations in the stack zone anyway, using corpses and scanning the stack zone (basically eagerly becomming activations in the stack zone) is already cheaper than the current become, whose only significant optimization is to scan only the remembered table the stack zone and new space if all objects being becommed are young.</div>
<div><br></div><div><br></div><div>Thanks for this discussion.  This is making increasing sense.  So lazy become and corpses will be used for all non-zero-sized objects.  Cool.</div><div><br></div><div>best</div><div>Eliot</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Cheers,<br>
<font color="#888888">Josh<br>
<br>
<br>
</font></blockquote></div><br>