guile-devel
[Top][All Lists]
Advanced

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

Re: A Working (but Minimal) JIT


From: Ken Raeburn
Subject: Re: A Working (but Minimal) JIT
Date: Mon, 29 Nov 2010 02:18:47 -0500

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 JITed code call the VM as a tail
>> call, because libjit will generate tail calls if you ask it to, but I
>> don't see how to get from C code to JIT code without pushing onto the
>> stack without either some assembly code or a trampoline.
> 
> You could cheat and assume that the C compiler does TCO (GCC 4.x does).

Last I checked, this was dependent on the platform, calling sequence style, 
stack layout, numbers of arguments, etc.  So it wouldn't always happen.  And 
not if optimization were turned off (for better debugging), or certain options 
given to the compiler, etc.  Then there's the whole question of supporting 
non-GCC compilers.

Seems like a bad assumption to me....

Ken


reply via email to

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