From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov 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 15:44:02 +0400 Message-ID: <501FAE02.80703@yandex.ru> 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; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1344253329 19271 80.91.229.3 (6 Aug 2012 11:42:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 11:42:09 +0000 (UTC) Cc: Paul Eggert , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Aug 06 13:42:05 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 1SyLhE-0001s4-4c for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2012 13:42:04 +0200 Original-Received: from localhost ([::1]:36304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyLhD-0000Pm-E7 for ged-emacs-devel@m.gmane.org; Mon, 06 Aug 2012 07:42:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyLhB-0000Ph-Eq for emacs-devel@gnu.org; Mon, 06 Aug 2012 07:42:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyLhA-00058J-8u for emacs-devel@gnu.org; Mon, 06 Aug 2012 07:42:01 -0400 Original-Received: from forward18.mail.yandex.net ([95.108.253.143]:39527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyLh9-00057x-OK for emacs-devel@gnu.org; Mon, 06 Aug 2012 07:42:00 -0400 Original-Received: from smtp16.mail.yandex.net (smtp16.mail.yandex.net [95.108.252.16]) by forward18.mail.yandex.net (Yandex) with ESMTP id 57E4717807DC; Mon, 6 Aug 2012 15:41:35 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344253295; bh=cXQgDzpZZA1djjj5dE8ktTM5s0oj6E7ulrGNurb50T0=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=Uni1LLlt/cLS5g4P3KNdC9CWrGJV2Xp//z8QQh0iFxQj26wO9laQ2FYKtDAerPh58 2OqbOehJ/mRh7kPr2VnsziwPOWeoneeCWYQzgIlHZxcEuVdgp2S2ykfHiyaq4jWcpc r9XJb8CIrNZ/UjRaxLcvu68J10lWF0CIcTMOA3K8= Original-Received: from smtp16.mail.yandex.net (localhost [127.0.0.1]) by smtp16.mail.yandex.net (Yandex) with ESMTP id 23F8B6A0643; Mon, 6 Aug 2012 15:41:35 +0400 (MSK) Original-Received: from unknown (unknown [37.139.84.55]) by smtp16.mail.yandex.net (nwsmtp/Yandex) with ESMTP id fYhannN3-fYhGWtGD; Mon, 6 Aug 2012 15:41:34 +0400 X-Yandex-Rcpt-Suid: monnier@iro.umontreal.ca X-Yandex-Rcpt-Suid: eggert@cs.ucla.edu X-Yandex-Rcpt-Suid: emacs-devel@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1344253295; bh=cXQgDzpZZA1djjj5dE8ktTM5s0oj6E7ulrGNurb50T0=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=co4K3rsor7BNa+v12bkusq156CT5BSQ7MCug/fntpSedAxkbzNHO3J/eZN3xiniTA R4FgmF3NqXvXPyy3jC+5snoamDo7sIy32TIbSlJXCpJ78SN+Dch4O9sS1+ToTmZF68 S67rqQxrVA+UDY9jD26yCqoOKBB7xp+WnIeohrxQ= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 95.108.253.143 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:152217 Archived-At: On 08/06/2012 02:54 PM, Stefan Monnier wrote: > 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". I (and I hope all others) too. But we do AREF and ASET for vectors, thinking about that vector implementation may be changed so direct access= to 'contents' becomes invalid or nonsense. So, I think that xGET and xSET= for complex structures fits this approach and don't add too much obfuscat= ion. Moreover, C itself is not designed to provide GC, and GC-aware system is "unusual" C program. So, I don't see a problem if such a program contains= some "unusual" constructs which aren't quite similar to a core language. =D0=9En the contrary, this sets a good point for a newcomer: "look at the= se strange things, they're implemented in a such unusual way because they're= really important, you should understand it before you write something". > 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, an= d > 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", the= n > 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. Development (and politics) is the art of the possible, and we have those tools which are. I investigated this area, and I believe that coccinelle is good enough to be used in our work; finally, I don't see the practical= reasons to wait until someone develops a wunderwaffe like GCC plugin for automatic barrier insertion on any critical pointer stores. Dmitry