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: Mon, 06 Aug 2012 06:54:10 -0400 Message-ID: References: <50191B54.2070705@yandex.ru> <5019FE2D.2060005@yandex.ru> <501B8C48.3000704@yandex.ru> <501C1F4D.5010007@cs.ucla.edu> <501D4E6F.6040702@cs.ucla.edu> <501E8B4B.3000805@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344250464 29843 80.91.229.3 (6 Aug 2012 10:54:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 10:54:24 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 06 12:54:23 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 1SyKx0-0003j2-Fz for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2012 12:54:18 +0200 Original-Received: from localhost ([::1]:49336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyKwz-0006QC-Rs for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2012 06:54:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54736) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyKwx-0006Ni-Dp for emacs-devel@gnu.org; Mon, 06 Aug 2012 06:54:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyKww-00006e-Ib for emacs-devel@gnu.org; Mon, 06 Aug 2012 06:54:15 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:55844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyKww-00006a-Dq for emacs-devel@gnu.org; Mon, 06 Aug 2012 06:54:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09Ld/QI/2dsb2JhbABEtBGBCIIVAQEEAScvIwULCw4mBwsUGA0kiBwFugmQRAOeOYR6gViDBQ X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="195034812" Original-Received: from 75-119-244-8.dsl.teksavvy.com (HELO pastel.home) ([75.119.244.8]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Aug 2012 06:54:13 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 111C559355; Mon, 6 Aug 2012 06:54:11 -0400 (EDT) In-Reply-To: <501E8B4B.3000805@yandex.ru> (Dmitry Antipov's message of "Sun, 05 Aug 2012 19:03:39 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:152213 Archived-At: > I believe that one of the goals for new GC should be the possibility > to run from almost any context, with a few exceptions like signal handlers. I want the C part of Emacs to look like C code. So, if the structure-field access does not require extra machinery (i.e. no read barrier), I want to write it "foo->bar". If we want to make sure that the write-barrier is used everywhere where it's needed, than we need to find a way to check this with some tool. Such a tool might require some extra annotations in the source code, and I'm willing to accept some such things, but I'd much rather avoid "FVAR (foo, bar)" if at all possible. If tools like coccinelle have trouble finding the right "foo->bar", then maybe we can try to find some coding convention that helps coccinelle find the right spots. Or find some other tool that can do those checks for us. E.g. maybe using "foo->_bar" would let us use as simple a tool as "sed" to rewrite "foo->_bar" into "RVALUE_FIELD (foo, bar)" when we need/want to run those static checks. Stefan