emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIEL


From: Stefan Monnier
Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIELD between buffers, keyboards and frames.
Date: Mon, 06 Aug 2012 06:54:10 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

> I believe that one of the goals for new GC should be the possibility
> to run from almost any context, with a few exceptions like signal handlers.

I want the C part of Emacs to look like C code.  So, if the
structure-field access does not require extra machinery (i.e. no read
barrier), I want to write it "foo->bar".

If we want to make sure that the write-barrier is used everywhere where
it's needed, than we need to find a way to check this with some tool.
Such a tool might require some extra annotations in the source code, and
I'm willing to accept some such things, but I'd much rather avoid
"FVAR (foo, bar)" if at all possible.

If tools like coccinelle have trouble finding the right "foo->bar", then
maybe we can try to find some coding convention that helps coccinelle
find the right spots.  Or find some other tool that can do those checks
for us.

E.g. maybe using "foo->_bar" would let us use as simple a tool as "sed"
to rewrite "foo->_bar" into "RVALUE_FIELD (foo, bar)" when we need/want
to run those static checks.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]