[Vm-dev] Immutability bit? Eliot?

Eliot Miranda eliot.miranda at gmail.com
Tue May 26 15:55:15 UTC 2009

Hi Goran,

2009/5/26 Göran Krampe <goran at krampe.se>

> Hi VM gurus!
> 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?

The immutability bit is already available in the Newspeak VM (
http://newspeaklanguage.org/downloads/).  This VM doesn't have the closure
bytecodes and the immutability bit is not in the current closure VMs, so
there is an integration step required.

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'd like the
feature in the standard VM.

...and oh, when do we get the new awesome VM? I am doing reload on
> mirandabanda every day but no luck so far... :) :)

The stack VM should be available very soon.  The JIT VM will be available
later in the year.

> 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 "dirty marking" because you can always
> catch the Exception, add the object as "dirty" in a pool, and then resume.
> Especially for all the persistence solutions out there this would be great
> to have - and would eliminate trickery like WriteBarrier:
> http://map.squeak.org/packagebyname/writebarrier

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

> regards, Göran
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20090526/ca8b85a8/attachment.htm

More information about the Vm-dev mailing list