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]

Re: JNI vs. #ifdef INTERPRETER


>>>>> "Marcus" == Marcus G Daniels <mgd@swarm.org> writes:

Marcus> An observation: _Jv_GetJNIEnvNewFrame and _Jv_LookupJNIMethod
Marcus> aren't defined unless INTERPRETER is defined which means that
Marcus> it isn't possible to use JNI on platforms like Sparc Solaris
Marcus> that don't build with interpreter support.

Could you try the appended patch and see if it works?
If it does I will check it in.

Note that RegisterNatives will only work when the interpreter is
around :-(.  This is a known flaw in our JNI implementation.  Fixing
it is probably easy, but I haven't done it.

BTW I really appreciate the testing you've done with JNI.  This is the
first time our JNI implementation has been heavily used.  Thanks.

Tom

Index: jni.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni.cc,v
retrieving revision 1.36.4.2
diff -u -r1.36.4.2 jni.cc
--- jni.cc	2001/03/23 19:12:19	1.36.4.2
+++ jni.cc	2001/03/30 21:14:17
@@ -1595,8 +1595,6 @@
 
 
 
-#ifdef INTERPRETER
-
 // Add a character to the buffer, encoding properly.
 static void
 add_char (char *buf, jchar c, int *here)
@@ -1752,6 +1750,8 @@
 
   return function;
 }
+
+#ifdef INTERPRETER
 
 // This function is the stub which is used to turn an ordinary (CNI)
 // method call into a JNI call.


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