aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-03-28 01:27:01 +0100
committerSven Gothel <[email protected]>2010-03-28 01:27:01 +0100
commita41f4d504d2f8cf58114d570d23f757ab2659cfc (patch)
treeebe021734de27004c1424130b0150f0b3cc2b5bb /src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java
parent2b61964060ffb79a313030d795ad069fbbe97b88 (diff)
http://www.jogamp.org/bugzilla/show_bug.cgi?id=389
Mixed types in generated code are functioning now, even though not all permutations are generated - still. However, this patch merges the indirect object passing, wheather it is a primitive array or an indirect NIO buffer, incl. PointerBuffer. This allows the usage of only one JNI functions for all combinations. Only in case of NIODirectOnly, the simplified direct only '0' variation is created - otherwise the parametrized '1' variant. The junit tests proves the implementation and almost completes the gluegen junit tests coverage for JavaEmitter and ProcAddressEmitter. Impact/Result: - Working mixed array types - JOGL GL2 native library shrunk around 30% - Simplified gluegen code - Almost complete gluegen junit tests TODO: Complete permutations of array/NIO arguments, if desired. ++++ Misc changes: - NativeLibrary implements DynamicLookupHelper: lookupFunction() -> dynamicLookupFunction()
Diffstat (limited to 'src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java')
-rwxr-xr-xsrc/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java b/src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java
index f6ae58e..2dda752 100755
--- a/src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java
+++ b/src/java/com/sun/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java
@@ -110,8 +110,8 @@ public class ProcAddressJavaMethodBindingEmitter extends JavaMethodBindingEmitte
return numEmitted;
}
- protected String getImplMethodName(boolean direct) {
- String name = super.getImplMethodName(direct);
+ protected String getImplMethodName() {
+ String name = super.getImplMethodName();
if (callThroughProcAddress) {
return ProcAddressEmitter.WRAP_PREFIX + name;
}
@@ -131,8 +131,8 @@ public class ProcAddressJavaMethodBindingEmitter extends JavaMethodBindingEmitte
}
}
- protected int emitCallArguments(MethodBinding binding, PrintWriter writer, boolean indirect) {
- int numEmitted = super.emitCallArguments(binding, writer, indirect);
+ protected int emitCallArguments(MethodBinding binding, PrintWriter writer) {
+ int numEmitted = super.emitCallArguments(binding, writer);
if (callThroughProcAddress) {
if (numEmitted > 0) {
writer.print(", ");