[Vm-dev] Re: Immutability, newspeak (was: Vm-dev post from jbaptiste.arnaud@gmail.com requires approval)

Igor Stasenko siguctua at gmail.com
Wed Jun 9 19:54:04 UTC 2010


On 9 June 2010 22:30, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
>
>
> On Wed, Jun 9, 2010 at 11:51 AM, Andreas Raab <andreas.raab at gmx.de> wrote:
>>
>> On 6/8/2010 7:41 AM, David T. Lewis wrote:
>>>
>>> What do the VM developers think with respect adopting the VM changes?
>>> The immutability bit is a scarce resource. Is it OK to allocate it
>>> for this purpose or are there likely to be other projects interested
>>> in using it for other reasons?
>>
>> Oh, and one thing that I'm just realizing is that by far the biggest impact of immutability is in primitives and plugins. All primitives in all plugins must be rewritten to test for mutability of the objects they store into before this can work reliably. Ouch.
>
> Ouch indeed.  One can at least put a check in interpreterProxy to catch attempts and cause primitives to fail.  It won't be pretty but will serve as lint for the plugins.
> Off the top of your head which plugins are likely to do writes?

There is a good primitives and bad ones.
A good ones, which use writes only to receiver. A bad ones, is those,
which doing writes to other objects (arguments/indirectly fetched
objects).
With good ones we could deal very easily, by simply modifying a code
generator to generate a write-check at the beginning of primitive. But
there is no way to deal automatically with bad ones :(

> And which of those are likely to do writes to immutables?

well, if we introduce a per-object immutability flag, then any of them
could eventually write to immutable object, isnt?

>>
>> Cheers,
>>  - Andreas
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Vm-dev mailing list