[Top][All Lists]

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

Re: A Working (but Minimal) JIT

From: Ludovic Courtès
Subject: Re: A Working (but Minimal) JIT
Date: Tue, 02 Nov 2010 23:51:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hi Noah!

Noah Lavine <address@hidden> writes:

> There is also something that I was trying to figure out but couldn't -
> how does code from the REPL make its way into the VM?

It’s compiled with ‘compile’ from (system base compile), from ‘scheme’
to ‘objcode’ language, then run (unless the ‘interp’ REPL option is set,
in which case code is eval’d).  See ‘repl-compile’ & co.

> I could certainly rewrite the important instructions with libjit,
> however, this would result in duplicated code, which is not ideal. I
> was wondering if you would be interested in coming up with a way to
> write them once so that they could be expanded to either
> directly-runnable C code or libjit calls.

Of course I’d be interested in such a beast!  :-)

> (Libjit basically implements a subset of C, so I don't think this
> would be too difficult.)

Oh, do you have pointers to the relevant part of the libjit manual?

> I was also wondering (and here's where the build process would get
> weird) if this language could be translated with Guile.

Of course, that’s the Holly Grail.  :-)

Perhaps CGEN <> could even come into play
somehow.  ;-)

But it’s tricky.  You’d have to devise a language that’s both
sufficiently expressive to implement all the instructions and
sufficiently simple to make compilation to C or libjit doable.


> The trouble would be that then Guile would be used to build Guile.

That can hopefully be worked around by checking in a copy of the
generated C code, for instance.


reply via email to

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