emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 9d8d065: Add support for finalizers


From: Daniel Colascione
Subject: Re: [Emacs-diffs] master 9d8d065: Add support for finalizers
Date: Tue, 03 Mar 2015 10:23:19 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0

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: signature.asc
Description: OpenPGP digital signature


reply via email to

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