[Vm-dev] [Cuis-dev] Write Barriers

Chris Muller asqueaker at gmail.com
Wed Feb 6 20:59:26 UTC 2019


> The write barrier was introduced in the VM a few years ago and is available at image level through a few extra primitives and the rewrite of the fall-back code of primitives mutating objects. VM support is complete.
>
> The typical thing implemented on top of the write barrier is to detect the next time an object is mutated

That is easier said than done.  How could this be accomplished
transparently?  Geralds question is:

>> > Alas, I just discovered, that I have to modify a lot of
>> > #at:put:-primitives to make it work with Array and similar
>> > classes.

Ideally, a single Exception handler would be able to handle all cases,
but it appears they have to be sprinkled about everywhere, including
in base code.  Worse, if one is missed, it'll simply be a silent bug
in the system, which is untenable.


 - Chris

> very cheaply performance-wise, and write image-level code to deal with the mutation.
>
> Best,
>
> On Tue, Feb 5, 2019 at 1:31 AM <ken.dickey at whidbey.com> wrote:
>>
>>
>> On 2019-02-04 13:26, Gerald Klix via Cuis-dev wrote:
>> ..
>> > I am implementing a package that supports the write barriers
>> > implemented in the current virtual machine.
>> > The package was meant to be an add-on to Cuis-Standard-Image.
>> > Alas, I just discovered, that I have to modify a lot of
>> > #at:put:-primitives to make it work with Array and similar
>> > classes. Therefore I would like have this package integrated
>> > in with current image, once it is finished.
>>
>> Gerald,
>>
>> As a long time advocate of "the simplest thing that will work", I am
>> wondering at what your goal and purpose is here.  What cool things are
>> you doing/adding that require a write barrier?
>>
>> Perhaps you should be looking at VMMaker and doing things at the VM
>> level?  If so, you might make a case in the vm-dev mailing list for
>> direct support.
>>
>> $0.02,
>> -KenD
>
>
>
> --
> Clément Béra
> https://clementbera.github.io/
> https://clementbera.wordpress.com/


More information about the Vm-dev mailing list