diff options
author | Sven Gothel <[email protected]> | 2023-06-16 01:16:55 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-06-16 01:16:55 +0200 |
commit | aeadfab9572e4b441b1bc1f0708cf4c72dfe181e (patch) | |
tree | 55255fa60b9753dbc812f6ba6677124b3099f3d3 /src/java/com/jogamp/gluegen/JavaEmitter.java | |
parent | 0a9105dd3ebbcf4b98664e50333334bff677031c (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/JavaEmitter.java')
-rw-r--r-- | src/java/com/jogamp/gluegen/JavaEmitter.java | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/java/com/jogamp/gluegen/JavaEmitter.java b/src/java/com/jogamp/gluegen/JavaEmitter.java index 577bca4..4e8a35f 100644 --- a/src/java/com/jogamp/gluegen/JavaEmitter.java +++ b/src/java/com/jogamp/gluegen/JavaEmitter.java @@ -408,22 +408,6 @@ public class JavaEmitter implements GlueEmitter { } /** - * Returns <code>true</code> if implementation (java and native-code) - * requires {@link #staticClassInitCodeCCode} and {@link #staticClassInitCallJavaCode} - * and have <code>initializeImpl()</code> being called at static class initialization. - * <p> - * This is currently true, if one of the following method returns <code>true</code> - * <ul> - * <li>{@link MethodBinding#signatureRequiresStaticInitialization() one of the binding's signature requires it}</li> - * <li>{@link JavaConfiguration#forceStaticInitCode(String)}</li> - * </ul> - * </p> - */ - protected final boolean requiresStaticInitialization(final String clazzName) { - return requiresStaticInitialization || cfg.forceStaticInitCode(clazzName); - } - - /** * Generates the public emitters for this MethodBinding which will * produce either simply signatures (for the interface class, if * any) or function definitions with or without a body (depending on @@ -466,13 +450,6 @@ public class JavaEmitter implements GlueEmitter { null != prologue || null != epilogue; - if( !requiresStaticInitialization ) { - requiresStaticInitialization = binding.signatureRequiresStaticInitialization(); - if( requiresStaticInitialization ) { - LOG.log(INFO, cSymbol.getASTLocusTag(), "StaticInit Trigger.1 \"{0}\"", binding); - } - } - final boolean emitBody = !signatureOnly && needsBody; final boolean isNativeMethod = !isUnimplemented && !needsBody && !signatureOnly; @@ -535,12 +512,6 @@ public class JavaEmitter implements GlueEmitter { cfg.javaEpilogueForMethod(binding, false, false) != null ; if ( !cfg.isUnimplemented( cSymbol ) ) { - if( !requiresStaticInitialization ) { - requiresStaticInitialization = binding.signatureRequiresStaticInitialization(); - if( requiresStaticInitialization ) { - LOG.log(INFO, cSymbol.getASTLocusTag(), "StaticInit Trigger.2 \"{0}\"", binding); - } - } // If we already generated a public native entry point for this // method, don't emit another one |