[RFC] opengl_dynamic_nci branch

Peter Lobsinger plobsing at gmail.com
Sat Feb 13 04:29:04 UTC 2010


On Fri, Feb 12, 2010 at 6:51 PM, Geoffrey Broadwell <geoff at broadwell.org> wrote:
> On Feb 12, 2010, at 15:30, Peter Lobsinger wrote:
> You know, the above makes me wonder if we need a thunk *interpreter*
> library.  Instead of generating optimized machine code for each thunk, it
> would instead simply take a signature string and a varargs list and convert
> the varargs to platform-appropriate native call arguments, perform the call,
> and unpack the return similarly.  It would be slow, but fully generic.  I'm
> assuming we'd have to write one of these per platform/compiler, but I
> wouldn't think it would be terribly difficult code.
>
> Just another point in the solution space, I guess.

A good idea. And like most good ideas, this has been done before. As
far as I can tell, libffi (http://sourceware.org/libffi/) takes this
approach and supports a large variety of platforms and os.

I am interested in providing a frame builder based on libffi. But
based on my experience with the libjit frame builder, I have come to
understand that there are complications with providing runtime frame
builders on parrot as it stands today. The opengl_dynamic_nci solution
is an incremental improvement on what we have now that provides a
"good enough" solution immediately.


More information about the parrot-dev mailing list