From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109327: Generalize INTERNAL_FIELD between buffers, keyboards and frames. Date: Fri, 03 Aug 2012 18:50:29 -0400 Message-ID: References: <50191B54.2070705@yandex.ru> <5019FE2D.2060005@yandex.ru> <501B8C48.3000704@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344034242 29820 80.91.229.3 (3 Aug 2012 22:50:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Aug 2012 22:50:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 04 00:50:43 2012 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 1SxQhe-000555-Of for ged-emacs-devel@m.gmane.org; Sat, 04 Aug 2012 00:50:42 +0200 Original-Received: from localhost ([::1]:50354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxQhd-0004Qv-Mv for ged-emacs-devel@m.gmane.org; Fri, 03 Aug 2012 18:50:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxQhY-0004QU-Bv for emacs-devel@gnu.org; Fri, 03 Aug 2012 18:50:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SxQhU-0006Sl-3W for emacs-devel@gnu.org; Fri, 03 Aug 2012 18:50:36 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:54952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SxQhT-0006Sh-W8 for emacs-devel@gnu.org; Fri, 03 Aug 2012 18:50:32 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q73MoTNe023543; Fri, 3 Aug 2012 18:50:30 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 40A7BAE2F8; Fri, 3 Aug 2012 18:50:29 -0400 (EDT) In-Reply-To: <501B8C48.3000704@yandex.ru> (Dmitry Antipov's message of "Fri, 03 Aug 2012 12:31:04 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4299=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4299> : streams <794132> : uri <1183247> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 132.204.246.20 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:152156 Archived-At: >>> the barrier (just one such a store is fatal for the collector). Next, >>> when we will know that the collector invariant is never broken, it's >>> possible to replace these obfuscated FVAR (x, y) back to x->y. >> You can use coccinelle to automatically turn the x->y into an rvalue >> FVAR (x,y) while debugging. And such a script should be kept around and >> run every once in a while to check that new code follows the >> SETFVAR convention. >> But I don't want the trunk's code obfuscated just for some temporary >> debugging needs. > Have you tried to use coccinelle? As I have said, it's not a silver bullet > (yet), and it's just impossible to handle such a stuff in fully automated > mode. There are special cases that should be handled manually, and doing > them over and over again is much worse than even an endless merging. If we want to use "foo->bar" in the end code, then we will need to solve this problem anyway (since, as mentioned, we'll need to check every once in a while that "foo->bar" is only used for rvalues). > And I still don't see an answer to the simplest possible question: why > (F|W)VARs are so bad but (B|K)VARs are OK? I don't actually think that BVAR/KVAR are OK either. Stefan