aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/MethodBinding.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-06-16 01:16:55 +0200
committerSven Gothel <[email protected]>2023-06-16 01:16:55 +0200
commitaeadfab9572e4b441b1bc1f0708cf4c72dfe181e (patch)
tree55255fa60b9753dbc812f6ba6677124b3099f3d3 /src/java/com/jogamp/gluegen/MethodBinding.java
parent0a9105dd3ebbcf4b98664e50333334bff677031c (diff)
GlueGen Struct [4]: JavaConfiguration Change: Drop 'ManualStaticInitCall', 'ForceStaticInitCode'; Add 'ReturnsStringOnly', 'MaxOneElement' and 'ImmutableAccess'
Drop 'ManualStaticInitCall', 'ForceStaticInitCode': With new CCodeUnit's `JVMUtil_NewDirectByteBufferCopy(..)` implementation and generalized Buffers' methods, no specific init code is required anymore. Add 'ReturnsStringOnly', 'MaxOneElement' and 'ImmutableAccess': - 'ReturnsStringOnly' only String getter, drop ByteBuffer/byte[] - 'MaxOneElement' only one element maximum for pointer reference - 'ImmutableAccess' strict read-only, also reduces generated code a lot
Diffstat (limited to 'src/java/com/jogamp/gluegen/MethodBinding.java')
-rw-r--r--src/java/com/jogamp/gluegen/MethodBinding.java23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/java/com/jogamp/gluegen/MethodBinding.java b/src/java/com/jogamp/gluegen/MethodBinding.java
index efa938f..42bae04 100644
--- a/src/java/com/jogamp/gluegen/MethodBinding.java
+++ b/src/java/com/jogamp/gluegen/MethodBinding.java
@@ -69,7 +69,6 @@ public class MethodBinding {
private boolean signatureUsesCPrimitivePointers;
private boolean signatureUsesCArrays;
private boolean signatureUsesJavaPrimitiveArrays;
- private boolean signatureRequiresStaticInitialization;
private int thisPointerIndex = -1;
/**
@@ -96,7 +95,6 @@ public class MethodBinding {
this.signatureUsesCPrimitivePointers = bindingToCopy.signatureUsesCPrimitivePointers;
this.signatureUsesCArrays = bindingToCopy.signatureUsesCArrays;
this.signatureUsesJavaPrimitiveArrays = bindingToCopy.signatureUsesJavaPrimitiveArrays;
- this.signatureRequiresStaticInitialization = bindingToCopy.signatureRequiresStaticInitialization;
this.thisPointerIndex = bindingToCopy.thisPointerIndex;
}
@@ -284,21 +282,6 @@ public class MethodBinding {
}
/**
- * Returns true if the wrapper implementation requires
- * static native code to be initialized, see {@link JavaConfiguration#forceStaticInitCode(String)}.
- * <p>
- * Currently triggered by:
- * <ul>
- * <li>Return type is a "compound type" and not a pointer</li>
- * </ul>
- * </p>
- */
- public boolean signatureRequiresStaticInitialization() {
- computeSignatureProperties();
- return signatureRequiresStaticInitialization;
- }
-
- /**
* Returns true if the return type or any of the outgoing arguments
* in the method's signature use arrays of "compound type wrappers",
* or NIO-based wrappers for C data structures.
@@ -371,17 +354,11 @@ public class MethodBinding {
signatureUsesCPrimitivePointers = false;
signatureUsesCArrays = false;
signatureUsesJavaPrimitiveArrays = false;
- signatureRequiresStaticInitialization = false;
if ( javaReturnType.isCompoundTypeWrapper() ) {
// Needs wrapping and/or setting of byte order (neither of which
// can be done easily from native code)
signatureUsesCompoundTypeWrappers = true;
-
- final Type cReturnType = getCReturnType();
- if ( !cReturnType.isPointer() ) { // FIXME: Compound call-by-value
- signatureRequiresStaticInitialization = true;
- }
}
if (javaReturnType.isNIOBuffer() ||