This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTL/tree (from gcc) and Scheme


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/



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]