Subject: Re: bug#12215: CSET is unnecessarily confusing

From: Stefan Monnier <[email-masked]>
Date: Thu, 23 Aug 2012 08:26:27 -0400

> True in both cases.  I suppose the notation could grow on one.

Yes, I didn't like it much when I first thought about it, but I'm
beginning to think it's the least bad option (the next one is to use
another preprocessor than cpp ;-).

> Second, why does the setter need the pointer to the start of
> the object, as well as a pointer to the field that's changing?

Depends on how the write barrier works; more specifically, depends on
where the write-barrier writes the "this was modified" info.  One choice
is to have a flag in the object (like gcmarkbit) that says "this object
was modified since last scan"; and for that you need a pointer to the
start of the object rather than only to the field.

Of course, there are also many other choices which don't require such
a pointer (e.g. you can add the field's address to a list of "modified
fields"; or you can have a flag covering all objects in a "page", ...).

        Stefan