unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: A Working (but Minimal) JIT
Date: Tue, 02 Nov 2010 23:51:38 +0100	[thread overview]
Message-ID: <87bp671gqt.fsf@gnu.org> (raw)
In-Reply-To: AANLkTim9kgC2nA5yKJm31ZPMn0mcq+nUnpY0LE6C+EP9@mail.gmail.com

Hi Noah!

Noah Lavine <noah.b.lavine@gmail.com> 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 <http://sourceware.org/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.

Thanks,
Ludo’.




  reply	other threads:[~2010-11-02 22:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-22  4:29 A Working (but Minimal) JIT Noah Lavine
2010-10-22 21:46 ` Phil
2010-10-27 21:17   ` Ludovic Courtès
2010-10-27 21:10 ` Ludovic Courtès
2010-10-27 22:53   ` Noah Lavine
2010-11-02 22:51     ` Ludovic Courtès [this message]
2010-11-20 13:37 ` Andy Wingo
2010-11-28 20:56   ` Noah Lavine
2010-11-29 21:25     ` Andy Wingo
2010-12-02  3:58       ` Noah Lavine
2010-12-06 22:06         ` Andy Wingo
2010-12-06 22:53           ` Noah Lavine
2010-11-28 20:58   ` Noah Lavine
2010-11-28 22:36     ` Ludovic Courtès
2010-11-29  7:18       ` Ken Raeburn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bp671gqt.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).