Re: A Working (but Minimal) JIT

2010-12-06 Thread Andy Wingo
Hi Noah, Apologies for the stochastic response times here... On Thu 02 Dec 2010 04:58, Noah Lavine noah.b.lav...@gmail.com writes: have the JITed code be a C function that returns an enum to indicate what the VM should do next. This is widely known as the trampoline approach -- you fall down

Re: A Working (but Minimal) JIT

2010-12-01 Thread Noah Lavine
Hello, I need to apologize for some temporary insanity when I wrote that last post. I do know a way to get JITed code working correctly with tail calls. It's not quite as efficient as I would like, but it's decent. We have the JITed code be a C function that returns an enum to indicate what the

Re: A Working (but Minimal) JIT

2010-11-28 Thread Noah Lavine
Hi, I am concerned about complexity. I agree that complexity is a problem. I just sent an email about Jitgen, which is something I cooked up to reduce code duplication. However, I can't tell if it's going to end up reducing code complexity or increasing it. What do you think? So what I would

Re: A Working (but Minimal) JIT

2010-11-28 Thread Noah Lavine
Hi, I am concerned about complexity. I agree that complexity is a problem. I just sent an email about Jitgen, which is something I cooked up to reduce code duplication. However, I can't tell if it's going to end up reducing code complexity or increasing it. What do you think? So what I would

Re: A Working (but Minimal) JIT

2010-11-28 Thread Ludovic Courtès
Hi! * A uniform way to invoke native code from the VM, and VM code from native code -- *preserving tail calls*. This seems to require either trampolines within the VM or platform-specific tail-call assembly. This one could be hard. I can make JITed code call the VM as a tail call,

Re: A Working (but Minimal) JIT

2010-11-28 Thread Ken Raeburn
On Nov 28, 2010, at 17:36, Ludovic Courtès wrote: * A uniform way to invoke native code from the VM, and VM code from native code -- *preserving tail calls*. This seems to require either trampolines within the VM or platform-specific tail-call assembly. This one could be hard. I can make

Re: A Working (but Minimal) JIT

2010-11-20 Thread Andy Wingo
Hi, On Fri 22 Oct 2010 06:29, Noah Lavine noah.b.lav...@gmail.com writes: After not emailing for a while, I have some good news: a JIT engine is working! Great news! I have been behind on things a bit, so apologies for taking a month to get back to you, and then only partially. In any case

Re: A Working (but Minimal) JIT

2010-11-02 Thread Ludovic Courtès
Hi Noah! Noah Lavine noah.b.lav...@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

Re: A Working (but Minimal) JIT

2010-10-27 Thread Ludovic Courtès
Hello! Phil theseaisinh...@gmail.com writes: On Thu, Oct 21, 2010 at 11:29 PM, Noah Lavine noah.b.lav...@gmail.com wrote: So, this is a possible way to get a JIT engine in Guile. What do people think of it? General question for the list: Have there already been debates on this list about

Re: A Working (but Minimal) JIT

2010-10-27 Thread Noah Lavine
Hello! Interesting.  Dealing with end-of-buffers situation is indeed tricky with lightning, and register allocation is lacking (I thought this wouldn’t necessarily be a problem because we can do a reasonable job with a fixed set of statically allocated registers.) That seems true, yes. Given

Re: A Working (but Minimal) JIT

2010-10-22 Thread Phil
On Thu, Oct 21, 2010 at 11:29 PM, Noah Lavine noah.b.lav...@gmail.com wrote: So, this is a possible way to get a JIT engine in Guile. What do people think of it? General question for the list: Have there already been debates on this list about doing native compilation all the time like a lot

A Working (but Minimal) JIT

2010-10-21 Thread Noah Lavine
Hello all, After not emailing for a while, I have some good news: a JIT engine is working! The current version is as minimal as possible. It can only JIT a function that does nothing and returns 0. And it's only activated by the 'mv-call' VM instruction. Here's how I've been testing it: