<br><br><div class="gmail_quote">On Mon, May 24, 2010 at 9:35 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
i updated the weak finalization classes.<br>
<br>
I made its behavior/protocol similar to old WeakRegistry,<br>
also all weak registry tests on new class is green.<br>
<br>
First, file in .st<br>
then .cs<br>
<br>
Also, don&#39;t forget about special objects array:<br>
<a href="http://bugs.squeak.org/view.php?id=7525" target="_blank">http://bugs.squeak.org/view.php?id=7525</a><br>
<br>
And sure thing, you will need a VM support for it.<br>
<br>
But I am unsure, how to introduce a fallback code (and do we really need it)?<br>
I thought, that i could just add a simple startUp routine which does<br>
GC to see if new finalization supported by VM.<br>
Then it could pick either WeakFinalizationRegistry or old WeakRegistry.<br>
But then, it will slow down the image startup significantly,<br>
not saying that John fought hard to avoid full memory/heap walk during<br>
image startup on iPhone.<br>
So, maybe introduce an additional prim into VM, which will tell us if<br>
it supports new finalization?<br>
Or query the VM version?<br></blockquote><div><br></div><div>Or store it in a flag in the image header flags word, accessed through vmParameterAt:put:. I would argue strongly that the VM should be backwards-compatible and the new mechanism is enabled by an image and that the enablement persists with the image rather than having to be reestablished on every startup.</div>
<div><br></div><div>I can supply code examples which will make this trivial.</div><div><br></div><div>best</div><div>Eliot</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I need your advice.<br>
<font color="#888888"><br>
<br>
--<br>
Best regards,<br>
Igor Stasenko AKA sig.<br>
</font><br><br>
<br></blockquote></div><br>