This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JNI without Jni_Lookup() ?


>>>>> "Erik" == Erik Poupaert <erik.poupaert@skynet.be> writes:

Erik> I guess, however, that simply defaulting to what javah
Erik> generates, as the single acceptable mangling variant, would be a
Erik> very acceptable solution.

Sure, I agree.  But JNI still uses a different calling convention than
ordinary code.  You can get around this by pushing the knowledge to
the callers.  But then you end up making a lot of things more fragile:
both the interpreter and reflection have to know about the new magic
arguments, as well as all compiled code (in fact this impacts binary
compatibility).

So it isn't easy.  These are all reasons we ended up with the stub
approach.  And, anyway, the lookup isn't the overhead, as Bryce has so
nicely demonstrated.  I'm sure that PR will be fixed sometime --
especially if it is API-related, since we'll want to fix it before
finalizing the library interface.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]