This patch against the HEAD of the subversion
repository adds support for the optional JNI 1.4
functions, GetDirectBufferAddress,
NewDirectByteBuffer and GetDirectBufferCapacity. I've
included a test that should cover most of the
functionality.
The meat of the patch is the JikesRVMSupport classes
in gnu.classpath and in
java.nio which acts as a bridge between the classpath
direct buffers and the
JNI 1.4 functions. One controversal change might be
the return type change of
NewDirectByteBuffer from Address to int, which seems
to be the correct type
for functions that return JNI references to objects.
Patch, description, test and statement of origin
Logged In: YES
user_id=1215435
great!
I'll have to take a look at the Address=> int change. I
suspect this won't work for us since we run Jikes RVM on 64
bit platforms, but I'll have to look through the code path
to be sure.
Logged In: YES
user_id=648271
I think the int is fine since it's not an address but a JNI
reference as returned from env.pushJNIRef. For example, the
NewObject JNI function also return an int, regardless of
platform, as returned from env.pushJNIRef.
What I was worried about was some kind of odd ABI
dependency on the Address return type I don't know about.
Logged In: YES
user_id=308843
I think in:
rvm/src/vm/libSupport/gnu/classpath/JikesRVMSupport.java
should be:
I agree the int looks funny, but I also agree we do it
elsewhere :-)
Regards,
Ian
Logged In: YES
user_id=648271
Yes, I fixed the Pointer32 issue in the second upload of
the patch a few minutes later than the original patch. I'm
sorry you got the patch too soon :)
Logged In: YES
user_id=1215435
ok, makes sense...I should read the patch before commenting
next time :)
Regression testing now; should commit later this morning.