Target Specific Code Generation in GCC Core

Tom Tromey tromey@redhat.com
Tue Nov 19 15:11:00 GMT 2002


>>>>> "rth" == Richard Henderson <rth@redhat.com> writes:

rth> No idea what to do about the second point.  Looks like you're
rth> supposed to check
rth> 	METHOD_NATIVE(decl) && flag_jni
rth> but this would only compile inside the Java front end.

A little background.  We're generating stubs functions that look like
ordinary methods.  These stubs at runtime look up the appropriate JNI
function and call it.  The stubs have to have the normal ABI.  On
Windows boxes, the underlying JNI functions have to have the stdcall
ABI.

The above expression would be fine for checking the stub, but the real
JNI call is represented by a type that we construct dynamically when
building the stub.  The code to build the stub function is all in a
single function, build_jni_stub.

Tom



More information about the Gcc mailing list