emacs-devel
[Top][All Lists]
Advanced

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

Re: Make buffer- and frame-locals a misc object


From: Stefan Monnier
Subject: Re: Make buffer- and frame-locals a misc object
Date: Wed, 15 Aug 2012 12:02:52 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

>>> This patch converts Lisp_Buffer_Local_Value to misc object (for the
>>> sake of GC-aware management) and provides simple inline access
>>> functions (for the sake of further GC development).
>> No, that's going backward.
>> Please explain why you think you need that, so we can find alternatives.

> This patch 1) converts Lisp_Buffer_Local_Value to misc object (for the
> sake of GC-aware management) and 2) provides simple inline access
> functions (for the sake of further GC development).

> What's going backward - 1) or 2) or both?

1) is going backward.

> For 1), my previous (and inglorious) attempt to hack around
> save-excursion shows that mixing explicitly allocated/freed objects
> with GC-managed objects is poor idea, so getting rid of xmalloc/xfree
> makes the things more predictable.

Fear of the unknown is not a good motivation for a change ;-)
Have you found out what was the problem?

But in any case the current use of xmalloc/xfree for Lisp_Buffer_Local_Value
doesn't show any sign of suffering from a similar problem.

> For 2), the usual purpose is to prepare the hooks for the write barrier.

Why have get_blv_value, since it's not needed for a write barrier?
The set_blv_* are OK, OTOH.

I do wonder, tho: do we need those write-barriers in the object-creation
function (e.g. make_buffer_local_value)?  After all, if GC happens
between the malloc and the end of the initialization, we're in trouble
anyway, right?


        Stefan



reply via email to

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