This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RTL/tree (from gcc) and Scheme
- From: Per Bothner <per at bothner dot com>
- To: Brad Lucier <lucier at math dot purdue dot edu>
- Cc: khamenya at mail dot ru, gcc at gcc dot gnu dot org
- Date: Mon, 11 Aug 2003 00:08:48 -0700
- Subject: Re: RTL/tree (from gcc) and Scheme
- References: <200308110634.h7B6YPfo024452@banach.math.purdue.edu>
Brad Lucier wrote:
Per Bothner wrote:
Valery A.Khamenya wrote:
Q1. were there any efforts on adding Scheme or CommonLisp to a GCC's
front ends family?
There is a Scheme front-end to GCC. It's called Kawa:
http://www.gnu.org/software/kawa/Compiling-to-executable.html
It uses Java bytecodes as an intermediate (and executable) format.
By this logic, couldn't Gambit-C be called a Scheme front-end to GCC
(that happens to use C as an intermediate format)?
Absolutely. My main point was that we don't "need" a new Scheme
Gcc front-end to compile Scheme using Gcc.
However, Kawa does have a couple of advantages in that respect.
One is that the interediate format (bytecodes) is directly
executable. Another is that Kawa uses the same compiler
also for eval, which improves consistency and simplicity.
More importantly, the use of the same bytecodes for eval
means that Kawa can benefit from dynamic (JIT-) compilation
and optimization of Java bytecodes; there just aren't
anywhere near the resources available for Scheme bytecodes.
(There are of course non-compiler advantages from running
on top of Java; such as access to a huge class library.)
On the other hand Java bytecodes are far from ideal for Scheme,
and having a Scheme compiler generate C allows tricks that are
impractical for Kawa.
--
--Per Bothner
per@bothner.com http://per.bothner.com/