From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Tue, 14 Sep 2010 16:55:58 -0600 Message-ID: References: <87bp805ecr.fsf@gmail.com> <874ods5ctf.fsf@gmail.com> <877hio3urh.fsf@gmail.com> <87wrqo2ev4.fsf@gmail.com> <87bp802bpd.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1284504976 3177 80.91.229.12 (14 Sep 2010 22:56:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2010 22:56:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Wojciech Meyer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 15 00:56:14 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 1OveQ9-0002Be-0c for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2010 00:56:13 +0200 Original-Received: from localhost ([127.0.0.1]:43883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OveQ8-0006VX-61 for ged-emacs-devel@m.gmane.org; Tue, 14 Sep 2010 18:56:12 -0400 Original-Received: from [140.186.70.92] (port=57470 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OveQ1-0006VE-1C for emacs-devel@gnu.org; Tue, 14 Sep 2010 18:56:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvePz-0001nB-OA for emacs-devel@gnu.org; Tue, 14 Sep 2010 18:56:04 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:39345) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvePz-0001n2-EH for emacs-devel@gnu.org; Tue, 14 Sep 2010 18:56:03 -0400 Original-Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8EMu2HL014617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Sep 2010 18:56:02 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8EMu1rG020640; Tue, 14 Sep 2010 18:56:01 -0400 Original-Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o8EMu0K0028466; Tue, 14 Sep 2010 18:56:01 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 349C93784BE; Tue, 14 Sep 2010 16:55:59 -0600 (MDT) X-Attribution: Tom In-Reply-To: <87bp802bpd.fsf@gmail.com> (Wojciech Meyer's message of "Tue, 14 Sep 2010 23:37:50 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:130159 Archived-At: Tom> For the concurrency stuff, we did two kinds of automated rewriting. Wojciech> If you could point me out with the tools you used for this Wojciech> job, I would be grateful, any points to git? It is in the concurrency branch in Emacs bzr. I assume this is mirrored in git, but I'm not sure. I can email you the two .el scripts if you like, plus the little GCC patch I had to use to get the right location for the -> tokens. Just let me know. If you check out the concurrency branch, the files are src/hack-buffer-objfwd.el and src/rewrite-globals.el. Wojciech> However clang error messages are currently are more precise Wojciech> than GCC (yes, we can match-replace regex, and it will work Wojciech> fine in most cases). Recent versions of GCC are a lot better about marking the correct token when emitting an error. Red Hat put some work into this. What hack-buffer-objfwd.el actually does is go to the location of the error, then go backwards over sexps doing some pattern matching to see where the left-hand-side of the -> operator starts. Then it rewrites. This is rather hacky and IIRC there are some Emacs-specific heuristics in there. Tom> My advice is to try to do this bulk rewriting work on head, so that it Tom> doesn't rot. I think that's been a problem for the concurrency work Tom> :-( Wojciech> Any chances to get it back to life? I have zero (really negative) free time. But yes, it can be resurrected. One starting point would be doing a merge from trunk. Giuseppe did this but ran into problems... I still don't really know the details, just that things changed on trunk in some conflicting way. Wojciech> Shall we setup a public repo somewhere then? We had one on gitorious. But I think if you are going to try to work on trunk you should just use bzr. Or at least use the semi-official git mirror when preparing patches. Tom