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: How and when to use GCPRO? Date: Mon, 27 Dec 2010 17:33:20 -0800 Message-ID: <4D193E60.8070108@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7761A3D216E65B5E4F2103D0" X-Trace: dough.gmane.org 1293500018 23987 80.91.229.12 (28 Dec 2010 01:33:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Dec 2010 01:33:38 +0000 (UTC) Cc: Andreas Schwab , Leo , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 28 02:33:33 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXORQ-0006Da-Gp for ged-emacs-devel@m.gmane.org; Tue, 28 Dec 2010 02:33:32 +0100 Original-Received: from localhost ([127.0.0.1]:58954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXORP-0006B5-Fp for ged-emacs-devel@m.gmane.org; Mon, 27 Dec 2010 20:33:31 -0500 Original-Received: from [140.186.70.92] (port=54518 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXORL-0006Ap-F5 for emacs-devel@gnu.org; Mon, 27 Dec 2010 20:33:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXORK-0004c5-E7 for emacs-devel@gnu.org; Mon, 27 Dec 2010 20:33:27 -0500 Original-Received: from mail-yi0-f41.google.com ([209.85.218.41]:58966) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXORK-0004bt-An for emacs-devel@gnu.org; Mon, 27 Dec 2010 20:33:26 -0500 Original-Received: by yia25 with SMTP id 25so1860747yia.0 for ; Mon, 27 Dec 2010 17:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=e1xLLJFDx1ispGkAiEFlk8RvyB9Ju1lfL8OJRLju2q0=; b=BmOhUD8NPvsNkBT2Ms/jacTsIjSCnXkrSV3GuCPpMarHynDubwTqi8e5tRRxHSBBXX RTvz8ZOpk0hQqv1lMLCeP1L5yxVn7UHROYFA0R+wP5gExsQu4oBaS3UGHJ+8XA5JJmv/ H3fuXbX0LpNj5Bm16VCJPSWUw9n9I9FAO7PPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=dzvDc8ALgU8HSM3YT+zj4V4QFkKVooDpZ3u3+VLXdaH4cMZUrsENzePCjkXm3tijsh 3D+MGIkHvRArZ8VZ0z4yxSTuGipuQnC7+TrXBJIyioDRPHEBGNFYsrlmHPnzhwzpKzgT 2yW7JI7Ig03/UtFzUZHVRGhkD4RcA515zMSZs= Original-Received: by 10.147.125.7 with SMTP id c7mr17434777yan.30.1293500005505; Mon, 27 Dec 2010 17:33:25 -0800 (PST) Original-Received: from edith.local (c-67-183-23-114.hsd1.wa.comcast.net [67.183.23.114]) by mx.google.com with ESMTPS id z5sm6944880yhc.31.2010.12.27.17.33.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Dec 2010 17:33:24 -0800 (PST) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 In-Reply-To: X-Enigmail-Version: 1.1.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133995 Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig7761A3D216E65B5E4F2103D0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/27/10 5:01 PM, Stefan Monnier wrote: >>> Actually, both Fcar and Fcdr can GC (by signalling an error which >>> triggers the debugger). >> But the debugger will not return. >=20 > Oh, right, >=20 Discussions like this worry me. What if the function is later changed to call something that can GC? What if it's used in some new context? If it's not utterly performance-critical code, isn't it better to be safe than sorry and GCPRO anyway? It's not as if it's an expensive operation. Premature optimization is the root of all evil, after all. --------------enig7761A3D216E65B5E4F2103D0 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.4.11 (Darwin) iEYEARECAAYFAk0ZPmIACgkQ17c2LVA10VuEYgCfSJTeTgkvlxRwejqfifzNYQyG /nUAoJChPKixkxaB3wW2YpukTBylJArP =37HL -----END PGP SIGNATURE----- --------------enig7761A3D216E65B5E4F2103D0--