From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Noah Lavine Newsgroups: gmane.lisp.guile.devel Subject: Re: summer of code ideas Date: Mon, 7 Mar 2011 17:11:14 -0500 Message-ID: References: <87pqq2vcnb.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1299535895 28521 80.91.229.12 (7 Mar 2011 22:11:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Mar 2011 22:11:35 +0000 (UTC) Cc: guile-devel@gnu.org To: =?ISO-8859-1?Q?Ludovic_Court=E8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 07 23:11:27 2011 Return-path: Envelope-to: guile-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 1Pwie9-0003Od-0Y for guile-devel@m.gmane.org; Mon, 07 Mar 2011 23:11:21 +0100 Original-Received: from localhost ([127.0.0.1]:50621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwie8-0008C3-G6 for guile-devel@m.gmane.org; Mon, 07 Mar 2011 17:11:20 -0500 Original-Received: from [140.186.70.92] (port=52501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwie5-0008Bv-0K for guile-devel@gnu.org; Mon, 07 Mar 2011 17:11:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwie3-0008RC-Q2 for guile-devel@gnu.org; Mon, 07 Mar 2011 17:11:16 -0500 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:58457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwie3-0008R7-Kc; Mon, 07 Mar 2011 17:11:15 -0500 Original-Received: by vxc38 with SMTP id 38so5240152vxc.0 for ; Mon, 07 Mar 2011 14:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WVNZ0CvOxYj4xHEUE731TcvqjxGhPyBZkIFDJvGPiyM=; b=kGCr5KuUt0MGvfbyIcND58A8ExDalShg6aFNLPHBpdz/EjOujNy6MLEOdwrBO8o7QR 2jRM126m16+Hr9KmCr3r9JE0x11UdQwaTbhVbkZqRxONgkU7SrVCUNXPhzyy3zra+d3F Urd5ALidZk6U4jk1wC7pfk9IzojS2fPzntC64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=bJtY2f1er4wOacGJjiGscLrT1fCvhGPr++VDXXhuAvc+IAIsG+r0V3+rRewFdGCYtH HFA0b68Om7tNyiwoypUjQYuIMTHBp0SQosLw6tWCrifDf6hlnOX3jLHeVki27tRllceW HTlK91EmUwgOPQNMZ/XchAtXN5LVsd2PpD/xs= Original-Received: by 10.52.66.14 with SMTP id b14mr1699968vdt.78.1299535874318; Mon, 07 Mar 2011 14:11:14 -0800 (PST) Original-Received: by 10.52.166.194 with HTTP; Mon, 7 Mar 2011 14:11:14 -0800 (PST) In-Reply-To: <87pqq2vcnb.fsf@gnu.org> X-Google-Sender-Auth: tqegZPuXTWh3exKArYRR7Op9eIc X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:11822 Archived-At: Hello, > Really? =A0I thought you were toying with JIT. =A0:-) Yes, it's been a while since we talked about that :-). I still want to do it, though. The current status as I see it is that I have a prototype JIT that works, and a plausible way to integrate it into Guile's VM. What needs to happen now is to write all of the opcodes as JIT functions (the prototype had five or so opcodes). Since writing them by hand would cause an absurd amount of code duplication, I wanted to do it automatically. We talked about having a Scheme-based language that could compile to both plain C and JIT, but decided that would make the VM too complicated, so the current idea is to use a C parser to parse the VM code and generate a JIT compiler from that. That's one reason I've been contributing patches to the PEG branch. I also started work on a C parser, which I was planning to publish once the PEG branch was merged (and once the parser was done, of course). So the JIT is actually moving along. >> I think you'd want to compile from Tree-IL to GCC's GIMPLE format (the >> highest-level intermediate representation they have, I think). > > Actually, I suspect there would be a lot of technical problems to solve, > notably because GCC is not a library and because passing it such complex > data structures may be far from trivial (see MELT). > Besides, for AOT, I was beguiled by Andy=92s initial plan of using > exclusively Scheme tools such as Sassy. Ah, I see. I was tempted by the idea of using GCC's already-excellent optimizer as the backend to whatever Scheme-specific stuff we do. If there's a way to do that, I think it would be worth quite a bit of pain to use that. I notice that GCC now has the ability to use plugins, so if we could write one of those then perhaps it wouldn't be so bad. I also imagine that if we approached them and said that a GSoC student would like to write a frontend for them, they might be willing to help out a bit. I think the goal should be to make the compiler part of a GCC frontend developed with the rest of the compiler, so it would stay up to date if interfaces changed, and also so that parts of it could be reused for other things, leading to GCC developers making our compiler faster. Noah