From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: Re: Make buffer- and frame-locals a misc object
Date: Wed, 15 Aug 2012 12:02:52 -0400 [thread overview]
Message-ID: <jwvsjbo9mq7.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <502BB333.70306@yandex.ru> (Dmitry Antipov's message of "Wed, 15 Aug 2012 18:33:23 +0400")
>>> 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
next prev parent reply other threads:[~2012-08-15 16:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-15 10:50 Make buffer- and frame-locals a misc object Dmitry Antipov
2012-08-15 14:20 ` Stefan Monnier
2012-08-15 14:33 ` Dmitry Antipov
2012-08-15 16:02 ` Stefan Monnier [this message]
2012-08-16 4:10 ` Buffer-/frame-local variables [Was: Re: Make buffer- and frame-locals a misc object] Dmitry Antipov
2012-08-17 13:20 ` Stefan Monnier
2012-08-17 14:29 ` Dmitry Antipov
2012-08-21 17:35 ` Stefan Monnier
2012-08-17 17:11 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvsjbo9mq7.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=dmantipov@yandex.ru \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.