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: Wed, 01 Aug 2012 19:52:07 -0400 Message-ID: References: <50191B54.2070705@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1343865139 22335 80.91.229.3 (1 Aug 2012 23:52:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Aug 2012 23:52:19 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 02 01:52:19 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 1Swii7-0001Pu-0v for ged-emacs-devel@m.gmane.org; Thu, 02 Aug 2012 01:52:15 +0200 Original-Received: from localhost ([::1]:54952 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swii6-0001Ot-DD for ged-emacs-devel@m.gmane.org; Wed, 01 Aug 2012 19:52:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swii3-0001On-NA for emacs-devel@gnu.org; Wed, 01 Aug 2012 19:52:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Swii2-0000eG-PK for emacs-devel@gnu.org; Wed, 01 Aug 2012 19:52:11 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:53275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Swii2-0000eB-LV for emacs-devel@gnu.org; Wed, 01 Aug 2012 19:52:10 -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 q71Nq7Lp020030; Wed, 1 Aug 2012 19:52:08 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 38E85AE2A6; Wed, 1 Aug 2012 19:52:07 -0400 (EDT) In-Reply-To: <50191B54.2070705@yandex.ru> (Dmitry Antipov's message of "Wed, 01 Aug 2012 16:04:36 +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 RV4297=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4297> : streams <793303> : uri <1181353> 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:152102 Archived-At: >>> * src/frame.h (FVAR): New macro. >> Is it really necessary? To me this just obfuscates the code. >> If/when it turns out to be needed, it'll be easy enough to introduce. > I have no ideas why BVAR and KVAR was introduced, but my motivation is: Then, please undo your changes. The INTERNAL_FIELD part is fine, but the new FVAR, WVAR, ... are not. Maybe it can be useful as an intermediate step on some separate generational-gc branch, but it doesn't have its place in trunk: I can't think of any way to make such macros give realistic performance with anything but a write-barrier, so such macros will only ever be needed for write accesses and never for read-accesses. So you're obfuscating the read-accesses (i.e. the most common case) for no good reason. I'm OK with introducing such macros to *set* such fields (i.e. for write barriers), but not to read them (at least not until there's a really good case for them). Stefan