On Sun, 2024-12-15 at 00:43 +0100, Maxime Devos wrote:
> > > Those willing to contribute a proper ahead-of-time compiler to
> > > GNU
> > > guile could use the GNU CC libgccjit library which is part of the
> > > GCC
> > > compiler.
> > > https://gcc.gnu.org/onlinedocs/jit/
> > 
> > ...and https://gcc.gnu.org/wiki/JIT
> > 
> > Indeed, it turns out that everyone using libgccjit is using it for
> > ahead-of-time compilation, rather than jit-compilation.  Sorry
> > about
> > picking a bad name :)
> 
> Are we talking about implementing a ‘to machine code’ compiler for
> Guile, or about implementing an ‘AOT to machine code’? 

I confess I have no idea what the conversation was about; I was just
responding to Basile's email to the "jit" mailing list :)


> Guile already has the former – it has a JIT (bytecode -> machine
> code) for some systems.
> 
> For what it’s worth -- I never worked with libgccjit or with the JIT
> code of Guile:
> 
> I imagine a basic (POC) AOT approach for Guile would be to let it
> compile AOT – with the JIT implementation, except adjusted to be
> relocatable and to add relocation information. As far as I can tell,
> libgccjit does not seem to support relocations and doesn’t say
> anything about whether the results are position-independent or not
> (so not suitable fo AOT), though presumably there are ways around
> that given the existence of gccemacs.

FWIW libgccjit builds position independent code, and can be used to
build dynamic libraries (which is what I believe gccemacs is doing).

Dave


Reply via email to