guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: summer of code ideas


From: Noah Lavine
Subject: Re: summer of code ideas
Date: Mon, 7 Mar 2011 17:11:14 -0500

Hello,

> Really?  I thought you were toying with JIT.  :-)

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’s 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]