Interpreter / GFFI

Kresten Krab Thorup krab@gnu.org
Wed Jul 7 22:23:00 GMT 1999


Anthony Green <green@cygnus.com> writes:

> Kresten wrote:
> > Here is an example, of how to build a stub, which is perhaps the most
> > interesting feature for now.  First, we build a data structure to
> > represent the prototype of the function we want:
> 
> Yes - this is exactly the kind of thing required for efficient
> invocation of interpreted code in a compiled environment.  The
> ClassLoader would create vtables on the fly and populate them with
> pointers to dynamically created stubs.

I cannot agree more...

> 
> It sounds like GFFI does more than just stub creation.  Is there any
> overlap between GFFI and libffi? http://sourceware.cygnus.com/libffi
> 

Well, feature-wise there is an overlap, because GFFI provides for both
foreign-function calls as well as stub-creation using the same
abstractions.  The source code however is not related.  

There is no assembly code in GFFI, except for one little piece to grab
the trampoline context register.. 

>
> Is GFFI available anywhere?
>

I put it up at:

	http://www.yl.is.s.u-tokyo.ac.jp/~krab/gffi-0.1.tar.gz 

There's a small example included as for how to use it.  This is
undocumented, but for you smart guys it should be no problem I
expect. 

Right now, it seems to work fine on sparc/solaris and i386/linux.  

-- Kresten

 Kresten Krab Thorup, Ph.D. Candidate
 c/o Yonezawa Laboratory
 Department of Information Science   
 The University of Tokyo             
 7-3-1 Hongo, Bunkyo-ku, Tokyo 113 Japan
 Fax: +81-(0)3-5689-4365	 
 Phone: +81-(0)3-3812-2111 ext 4118
 Mobile: +81-(0)90-3693-5715


More information about the Java mailing list