Subject: bug#12215: CSET is unnecessarily confusing

From: Paul Eggert <[email-masked]>
Date: Thu, 23 Aug 2012 07:40:43 -0700

On 08/23/2012 05:26 AM, Stefan Monnier wrote:
> 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.

If that flag has a standard name, one doesn't
need separate macros BSET/CSET/etc; one can have just
one macro that works for all types.

> 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", ...).

Or one can rely on the hardware's memory-mapping facilities;
by making the page readonly until some code writes to it.
This would mean we don't need a setter macro.

It'd be nicer from the Emacs maintenance
point of view, most code could chug along
in the traditional way.  That is, we apply the
<http://bugs.gnu.org/12215#34> patch to the trunk to get
rid of the setters, and create a gc branch that uses mmap
rather than reintroducing lots of changes to add calls to a
setter macro or macros.