From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daniel Colascione Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 9d8d065: Add support for finalizers Date: Tue, 03 Mar 2015 10:23:19 -0800 Message-ID: <54F5FC17.1010600@dancol.org> References: <20150302233934.18904.59563@vcs.savannah.gnu.org> <54F5EAA6.8030403@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1h8PMP8mTC35WMDtoxTQdtj3ULME5aDdr" X-Trace: ger.gmane.org 1425407022 1932 80.91.229.3 (3 Mar 2015 18:23:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Mar 2015 18:23:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Mar 03 19:23:42 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YSrTk-000893-Eo for ged-emacs-devel@m.gmane.org; Tue, 03 Mar 2015 19:23:36 +0100 Original-Received: from localhost ([::1]:40308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSrTj-0005DE-Q6 for ged-emacs-devel@m.gmane.org; Tue, 03 Mar 2015 13:23:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSrTf-0005Ax-Qg for emacs-devel@gnu.org; Tue, 03 Mar 2015 13:23:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSrTZ-0005k1-UA for emacs-devel@gnu.org; Tue, 03 Mar 2015 13:23:31 -0500 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:60807) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSrTZ-0005jv-Mo for emacs-devel@gnu.org; Tue, 03 Mar 2015 13:23:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Type:In-Reply-To:References:Subject:CC:To:MIME-Version:From:Date:Message-ID; bh=KYs/W17f5xsPT1wQkDOoCWqBWrlrmLvSzGMZWsPTm88=; b=EtThI1FAY2x4id0lVAbl0iL3q+ajWu6EMiJpToDdUzMz2SaTyvn+x/EuAVrzEumnnbV4En6hwaG5d2x8n5IOjeS55Kn62rqpCkuYNoHGReePBuB7S7hcQZ50Iib71PMZOeQyvMk2Q7SNk2DlzfZ8j2zk0aN+Ey2Zh1etNXsQQgGVMyOg1+9aQNajuikutaztA9LyyGhbd2T+DuUSW9uDDxs4YqYE3IuOWCj0v58+vQzZtI3bXOySEOk9EbD1QQsj76j1ai/0hW5T3ttInD3uecqhwvjdPCDV9QV/dm8u7eydZ8kZt1L2Q1gDLTSf1KmDfvzHc9i/+6bpWm3qhHyRAA==; Original-Received: from [2620:10d:c081:1101:2ab2:bdff:fe1c:db58] by dancol.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1YSrTZ-0007Jo-8o; Tue, 03 Mar 2015 10:23:25 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2600:3c01::f03c:91ff:fedf:adf3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183616 Archived-At: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --1h8PMP8mTC35WMDtoxTQdtj3ULME5aDdr Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 w= e > 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/constan= t. >> I've also seen it for boolean-valued variables. >=20 > Oh, yes, you're not the only one introducing such horrors, but we shoul= d > still avoid making things worse in this respect. Fixed. --1h8PMP8mTC35WMDtoxTQdtj3ULME5aDdr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJU9fwXAAoJEN4WImmbpWBl6aIP/iZKwCQXCHvCBGKAT7b9/i/0 QyhKDd3fainzics00hc0IXDiPFNCi700aWYfkBpS+G5VtIIG5j29sqxR4XOhI0oY nbtP16MWqWOeluEBX7/uwqIMAVTZ+mHghL1Ubvmig4/0T0Mu0NPctkBn1zFmYjaX a82hQ1AVTxwMmcA9AY0tUxQ0BudklHFaKL/WSRsz22jfdilv5BBlIZBsHlNcPYQx /K7Mc5ck5pRCf1VjuvZ8AltMUAiChlGjgb4Ka+8SECXa3b+0m4hhlLXKUSCBd/UA VQUaw487h9Cd/Nx8d5f+lbqNNE9OToWwu8ORD55R7RjqtVu3XlWlTHknH3/m58JS bYQgXV5PMyAi5DMTe/IyKs112FCDAjDnK7LfMAIq+6D4TUxjunV850I1D0cZ+6zN XIykUVKBbIEM0uGu+wEGIcqFebdHKwf/5i3Yp95mkQiNcO1gUVbCG1eUSDNZ01aD m/GHM8hfa8xBq6Un4uCB3Djy8RvG2tzR6nZ56x1GJKqXiyBKzPe1c1mDx1MmS+kw CeXSj6AOEO+3AZjI2e2LPIPiCxs3MKSUC/WQm23AmPWWZOqYIICi1xy9mnA//2YH hstrrT0IVwAZtaQ8dn4+N5ZpmYFCPMjjYD5AFg9qfOepRrQjt0BkeipdNXYVpdvy b1u9xU4isHLzvpmHPvOO =3aMZ -----END PGP SIGNATURE----- --1h8PMP8mTC35WMDtoxTQdtj3ULME5aDdr--