all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <dancol@dancol.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master 9d8d065: Add support for finalizers
Date: Tue, 03 Mar 2015 10:23:19 -0800	[thread overview]
Message-ID: <54F5FC17.1010600@dancol.org> (raw)
In-Reply-To: <jwvegp67xqx.fsf-monnier+emacsdiffs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]

On 03/03/2015 10:18 AM, Stefan Monnier wrote:
>>> Question: why use a doubly-linked list, unlike pretty much everything
>>> else in our code base?
>> We remove finalizers from the middle of the list in unchain_finalizer.
>> We could just rebuild the list as we scan it, but when we'd have to
>> touch every node. Or we could maintain auxiliary state, but then in
>> run_finalizers we'd have to scan the whole list instead of the part
>> we're running.
> 
> You can remove them from the middle of the list with a singly-linked
> list as well, by keeping a "double-indirection" pointer.  That's what we
> do for markers.
> It's not ideal, but it's no worse than using doubly-linked lists.

Yes, of course. That's why I should wait a few seconds before sending
emails. :-) That scheme still complicates iteration, though. Besides:
it's a Lisp_Misc. We're not going to make it any smaller by leaving out
the extra links.

>>>> +  DEFVAR_BOOL ("gc-precise-p", gc_precise_p,
>>> This name is wrong.  "-p" stands for "predicate" and a predicate is
>>> a function that returns a boolean, whereas this is a variable/constant.
>> I've also seen it for boolean-valued variables.
> 
> Oh, yes, you're not the only one introducing such horrors, but we should
> still avoid making things worse in this respect.

Fixed.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-03-03 18:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150302233934.18904.59563@vcs.savannah.gnu.org>
     [not found] ` <E1YSZvy-0004vW-Tc@vcs.savannah.gnu.org>
2015-03-03 17:03   ` [Emacs-diffs] master 9d8d065: Add support for finalizers Stefan Monnier
2015-03-03 17:08     ` Daniel Colascione
2015-03-03 18:18       ` Stefan Monnier
2015-03-03 18:23         ` Daniel Colascione [this message]

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=54F5FC17.1010600@dancol.org \
    --to=dancol@dancol.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /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.