Hi Goran,<br><br><div class="gmail_quote">2009/5/26 Göran Krampe <span dir="ltr">&lt;<a href="mailto:goran@krampe.se">goran@krampe.se</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hi VM gurus!<br>
<br>
I just responded to a persistence thread on the seaside-list and it occurred to me that I should ask you guys - especially Eliot I guess - will the new VM have support for detecting object modification?</blockquote><div>
<br></div><div>The immutability bit is already available in the Newspeak VM (<a href="http://newspeaklanguage.org/downloads/">http://newspeaklanguage.org/downloads/</a>).  This VM doesn&#39;t have the closure bytecodes and the immutability bit is not in the current closure VMs, so there is an integration step required.</div>
<div><br></div><div>The real step however is some way of conveniently making the immutability bit optional.  When I figure this out I can do the integration step, do some performance comparisons and then ask the community if they&#39;d like the feature in the standard VM.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">...and oh, when do we get the new awesome VM? I am doing reload on mirandabanda every day but no luck so far... :) :)</blockquote>
<div><br></div><div>The stack VM should be available very soon.  The JIT VM will be available later in the year.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Cees de Groot explained a technique (a long while back) using an immutability bit on objects - combined with some Exception being signalled when an immutable object is about to be modified. This way you get both support for immutable objects AND &quot;dirty marking&quot; because you can always catch the Exception, add the object as &quot;dirty&quot; in a pool, and then resume.<br>

<br>
Especially for all the persistence solutions out there this would be great to have - and would eliminate trickery like WriteBarrier:<br>
<br>
<a href="http://map.squeak.org/packagebyname/writebarrier" target="_blank">http://map.squeak.org/packagebyname/writebarrier</a><br></blockquote><div><br></div><div>Right.  VisualAge was the first Smalltalk I know of to use an immutable bit, and GemStone used it there.  I added this to VisualWorks along with the necessary exception support and now GemStone uses the bit on VW too.  The work I did for Newspeak was very similar to the VisualWorks scheme.  If you download the Newspeak system you can experiment with the immutablity scheme there-in.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
regards, Göran<br>
<br>
</blockquote></div><br>