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 15:16:55 -0600 Message-ID: References: <87bp805ecr.fsf@gmail.com> <874ods5ctf.fsf@gmail.com> <877hio3urh.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 1284499029 11696 80.91.229.12 (14 Sep 2010 21:17:09 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 14 Sep 2010 21:17:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: Wojciech Meyer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 14 23:17:08 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 1OvcsG-0008S0-3n for ged-emacs-devel@m.gmane.org; Tue, 14 Sep 2010 23:17:08 +0200 Original-Received: from localhost ([127.0.0.1]:35357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OvcsF-0001tp-IG for ged-emacs-devel@m.gmane.org; Tue, 14 Sep 2010 17:17:07 -0400 Original-Received: from [140.186.70.92] (port=53562 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovcs9-0001tW-Dp for emacs-devel@gnu.org; Tue, 14 Sep 2010 17:17:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ovcs6-0006KJ-QL for emacs-devel@gnu.org; Tue, 14 Sep 2010 17:17:01 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:35585) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ovcs6-0006K0-JF for emacs-devel@gnu.org; Tue, 14 Sep 2010 17:16:58 -0400 Original-Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o8ELGviD008189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 14 Sep 2010 17:16:57 -0400 Original-Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o8ELGuPo016719; Tue, 14 Sep 2010 17:16:57 -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 o8ELGuC5018109; Tue, 14 Sep 2010 17:16:56 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id E9FA53784BE; Tue, 14 Sep 2010 15:16:55 -0600 (MDT) X-Attribution: Tom In-Reply-To: <877hio3urh.fsf@gmail.com> (Wojciech Meyer's message of "Tue, 14 Sep 2010 22:00: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.16 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:130154 Archived-At: >>>>> "Wojciech" == Wojciech Meyer writes: Tom> It could be done. It just requires someone willing to do the work. Wojciech> I know. I could get my old sources of generational garbage Wojciech> collector, to work. However it is a daunting job (the worse I Wojciech> could imagine, garbage collectors are nasty), plugging and Wojciech> debugging a new garbage collector to such huge and esoteric (I Wojciech> am sure people that who've been working on Emacs for years Wojciech> will not take this words badly and understand straight away Wojciech> what I am (a newbie) talking about) project like Wojciech> Emacs. However I might try to experiment with it (however Wojciech> unfortunately I am not that self confident about it ;) ). It is always ok to ask for help. The current collector is very simple to understand. If you read alloc.c, and look through the data structures representing lisp objects (in lisp.h), you will have a pretty good idea of what is going on. FWIW, I looked at writing an incremental collector for Emacs. I was primarily interested in using software write barriers... this turns out to be hard because there is a lot of code in Emacs of the form: FIELD_ACCESSOR (object) = value; ... which for a software barrier has to be converted to: SET_FIELD_ACCESSOR (object, value); (There are other bad things, too, like passing around a Lisp_Object* that points to the contents of a vector.) So, lots of grunge work, just to get the point where you could start actually working on the GC. I would look at automated rewriting to make this work -- that worked out great on the concurrent branch. There was a more real attempt based on the Boehm GC. I think the bits from that are still on a branch. This GC has a generational mode that, IIRC, is based on memory protection bits. Tom