Skip to content
The Jenkins Controller is preparing for shutdown. No new builds can be started.
Unstable

Changes

Summary

  1. gluegen: avoid a suppressed warning annotation by using the ArrayList (details)
  2. gluegen: remove an unreferenced writer variable (details)
  3. gluegen: update antlr grammer to produce annotated enum and functionName (details)
  4. gluegen: move all antlr grammars to a top-level directory (details)
  5. gluegen: pair the grammer input folder with an out.dir value (details)
  6. gluegen: update the target names for generating java code (details)
  7. gluegen: remove some unused imports (details)
  8. gluegen: update HeaderParser grammar to annotation EnumType map and (details)
  9. JavaEmitter.typeToJavaType: Simplify if-else block ; (details)
  10. Minor edits: space, final qualifier; setenv-build-*: Add generic JDK (details)
  11. ReflectionUtil.getConstructor: Add 'initializeClazz' argument, allowing (details)
  12. GlueGen: Add support for 'compound call-by-value', i.e. passing and (details)
  13. gluegen: move all antlr grammars to a top-level directory (refine commit (details)
  14. complete commit 33eb9484c4675423431521f2271e3e9d8d38f3b2 (details)
  15. TestVersionSemantics: No more expecting BACKWARD_COMPATIBLE* (Due to (details)
  16. GlueGen: Add support for 'compound array call-by-value' (details)
  17. Fix commit f4e753ff1f39be381307ffdb0fb6bb7a2d323eff: 'compound array (details)
  18. GlueGen: Refine compound [array] call-by-value native code injection and (details)
  19. GlueGen: Refine compound [array] call-by-value native code injection and (details)
Commit 775ec79d5d719c1eba9c4687ae066f6b82696e4f by Harvey Harrison
gluegen: avoid a suppressed warning annotation by using the ArrayList copy constructor

clone() can't be used without warnigns and is no more efficient that the copy constructor,
replace the call and kill the suppressed warning annotation.  While here, mark the
modifier list as private final.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified src/java/com/jogamp/gluegen/FunctionEmitter.java (diff)
Commit 5a9bee7ad9085cfd71053041aff3cabce2325f22 by Harvey Harrison
gluegen: remove an unreferenced writer variable

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified src/java/com/jogamp/gluegen/FunctionEmitter.java (diff)
Commit b8d85c035bbd2d6fa8a37f957bcf80acab18015e by Harvey Harrison
gluegen: update antlr grammer to produce annotated enum and functionName sets

The annotations are all commented out, uncomment them and reduce the type warnings
during the build.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified src/java/com/jogamp/gluegen/jgram/JavaParser.g (diff)
The file was modified src/java/com/jogamp/gluegen/jgram/Test.java (diff)
Commit e8bc9edd3c39170af038ab23b8cdca9ffd6f2d56 by Harvey Harrison
gluegen: move all antlr grammars to a top-level directory

/src/main/antlr/..

This gets the .g files unmixed from the non-generated java files for the cgram/jgram packages.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was removedsrc/java/com/jogamp/gluegen/cgram/StdCParser.g (diff)
The file was modified make/build.xml (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCEmitter.g (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/cgram/StdCParser.g (diff)
The file was removedsrc/java/com/jogamp/gluegen/cgram/GnuCTreeParser.g (diff)
The file was removedsrc/java/com/jogamp/gluegen/cgram/HeaderParser.g (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCParser.g (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/cgram/HeaderParser.g (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCTreeParser.g (diff)
The file was removedsrc/java/com/jogamp/gluegen/cgram/GnuCParser.g (diff)
The file was removedsrc/java/com/jogamp/gluegen/jgram/JavaParser.g (diff)
The file was removedsrc/java/com/jogamp/gluegen/cgram/GnuCEmitter.g (diff)
The file was addedsrc/main/antlr/com/jogamp/gluegen/jgram/JavaParser.g (diff)
Commit 0e54f57338e888e9835069776de32dcb47c54a17 by Harvey Harrison
gluegen: pair the grammer input folder with an out.dir value

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified make/build.xml (diff)
Commit 38e34f378a97f3653ad160e49677a005b6f7a32f by Harvey Harrison
gluegen: update the target names for generating java code

Also move the antlr-wrapping targets to be near the one place they are used.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified make/build.xml (diff)
Commit d6a5fa9169cc3f7abdb7a23068ddd76f632eec26 by Harvey Harrison
gluegen: remove some unused imports

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified src/java/com/jogamp/gluegen/GlueEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/DebugEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/procaddress/ProcAddressJavaMethodBindingEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/cgram/CToken.java (diff)
The file was modified src/java/com/jogamp/gluegen/cgram/TNodeFactory.java (diff)
Commit 5d802fb8dd4004039d4597253712d24fffb90a36 by Harvey Harrison
gluegen: update HeaderParser grammar to annotation EnumType map and functions list

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
The file was modified src/java/com/jogamp/gluegen/GlueGen.java (diff)
The file was modified src/main/antlr/com/jogamp/gluegen/cgram/HeaderParser.g (diff)
Commit d3e2cd6432b3383d4589350d60170e02db469343 by Sven Gothel
JavaEmitter.typeToJavaType: Simplify if-else block ; JavaType.getDumpString(): Add more info ..
The file was modified src/java/com/jogamp/gluegen/JavaEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaType.java (diff)
Commit 56a22f2937c334320637557ef6cd9b38c4b03022 by Sven Gothel
Minor edits: space, final qualifier; setenv-build-*: Add generic JDK location
The file was modified src/native/common/JVMUtil.c (diff)
The file was modified src/java/com/jogamp/common/os/DynamicLibraryBundle.java (diff)
The file was modified make/scripts/setenv-build-jogl-x86.sh (diff)
The file was modified make/scripts/setenv-build-jogl-x86_64.sh (diff)
Commit 9d857ea3575ee263801741a95711d9214c156276 by Sven Gothel
ReflectionUtil.getConstructor: Add 'initializeClazz' argument, allowing to defer static class initialization
The file was modified src/java/com/jogamp/common/util/IOUtil.java (diff)
The file was modified src/java/com/jogamp/common/util/ReflectionUtil.java (diff)
Commit c3054a01990e55ab35756ea23ab7d7c05f24dd37 by Sven Gothel
GlueGen: Add support for 'compound call-by-value', i.e. passing and returning struct instance

'compound call-by-value' is not efficient.

However, to allow mapping APIs utilizing passing small structs
as arguments and return values - this feature has been added.

+++

To return the struct value, native code needs to
allocate a NIO ByteBuffer and copy the data.
The stack return value can be dismissed afterwards and the
NIO buffer is returned.

We include this functionality for all generated [impl] classes,
native method:
  'static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jlong capacity)'

  (See: 'JavaEmitter.initClassAccessCode')

Since this code requires knowledge of java classes and methods,
for which a reference needs to be acquired, a static initialization method
has been introduced for all generated [impl] classes:
  'private static native boolean initializeImpl();'

Per default the this method will be called in the new
static initializer block of the class,
which can be supressed via the configuration element:
   'ManualStaticInit <class-name>'

'ManualStaticInit' can be used to issue the 'initializeImpl()'
call in a custom static initializer written by the user.

However, at the time 'initializeImpl()' gets called
the JNI native library must have been loaded, of course!

+++

- See tag: // FIXME: Compound call-by-value
  for code changes and validation of completeness

Trigger for compond call-by-value in CMethodBindingEmitter is:
   !cArgType.isPointer() && javaArgType.isCompoundTypeWrapper()

Trigger for compond call-by-value in JavaEmitter is:
  t.isCompound()

+++

Further more we do tolerate 'javaType.isCPrimitivePointerType()',
i.e. adding comments for offset/size and field entries,
which are all NOP.

This allows to utilize the remaining fields of the native structure.

+++

Tests: Added call-by-value to test1.[ch] binding test!
The file was modified make/scripts/runtest.sh (diff)
The file was modified src/java/com/jogamp/gluegen/JavaConfiguration.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaEmitter.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java (diff)
The file was modified src/java/com/jogamp/gluegen/CMethodBindingEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.c (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.h (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/Test1p2ProcAddressEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaType.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/Test1p1JavaEmitter.java (diff)
Commit 33eb9484c4675423431521f2271e3e9d8d38f3b2 by Sven Gothel
gluegen: move all antlr grammars to a top-level directory (refine commit e8bc9edd3c39170af038ab23b8cdca9ffd6f2d56): src/antlr (IMHO no need for 'main')

/src/main/antlr/ -> /src/antlr/
The file was removedsrc/main/antlr/com/jogamp/gluegen/cgram/HeaderParser.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/cgram/HeaderParser.g (diff)
The file was removedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCTreeParser.g (diff)
The file was removedsrc/main/antlr/com/jogamp/gluegen/cgram/StdCParser.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/jgram/JavaParser.g (diff)
The file was removedsrc/main/antlr/com/jogamp/gluegen/jgram/JavaParser.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/cgram/GnuCEmitter.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/cgram/GnuCTreeParser.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/cgram/StdCParser.g (diff)
The file was removedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCEmitter.g (diff)
The file was removedsrc/main/antlr/com/jogamp/gluegen/cgram/GnuCParser.g (diff)
The file was addedsrc/antlr/com/jogamp/gluegen/cgram/GnuCParser.g (diff)
Commit 1ee6e77f731b1254792ecd23c8f4b6a8affc6375 by Sven Gothel
complete commit 33eb9484c4675423431521f2271e3e9d8d38f3b2
The file was modified make/build.xml (diff)
Commit a75276408c9bcff77f568cf72b6c71e421a07552 by Sven Gothel
TestVersionSemantics: No more expecting BACKWARD_COMPATIBLE* (Due to bumping to 2.2.0)
The file was modified src/junit/com/jogamp/common/util/TestVersionSemantics.java (diff)
Commit f4e753ff1f39be381307ffdb0fb6bb7a2d323eff by Sven Gothel
GlueGen: Add support for 'compound array call-by-value'

Completing commit c3054a01990e55ab35756ea23ab7d7c05f24dd37
by allowing passing compound arrays via 'call-by-value.

- Creating linear temp heap, copying NIO values into it
   and passing to C function.
   Copy-back if not 'const', see below.

- Respect 'const' qualifier to skip write-back of
   temp heap passed to C function

- See tag: // FIXME: Compound and Compound-Arrays
   for code changes and validation of completeness

- triggers for compound arrays are:
     - javaType.isArrayOfCompoundTypeWrappers()
     - type.isArray()

- simplified const query by c-type: FunctionEmitter.isBaseTypeConst(ctype)

+++

Tests: Added call-by-value to test1.[ch] binding test!
The file was modified src/java/com/jogamp/gluegen/JavaEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/cgram/types/FunctionType.java (diff)
The file was modified src/java/com/jogamp/gluegen/procaddress/ProcAddressEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/FunctionEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/CMethodBindingEmitter.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.h (diff)
The file was modified src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.c (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java (diff)
The file was modified src/java/com/jogamp/gluegen/cgram/types/ArrayType.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaType.java (diff)
The file was modified src/java/com/jogamp/gluegen/MethodBinding.java (diff)
Commit 9843e983a4fc71a64eb3de9cb364a1f4ffa56b3a by Sven Gothel
Fix commit f4e753ff1f39be381307ffdb0fb6bb7a2d323eff: 'compound array call-by-value' JavaMethodBindingEmitter, array may still require NIO handling, also consider NIO array length.
The file was modified src/java/com/jogamp/gluegen/JavaMethodBindingEmitter.java (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.c (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/test1.h (diff)
The file was modified src/junit/com/jogamp/gluegen/test/junit/generation/BaseClass.java (diff)
Commit 1eadaf928f4f61aae4de1c8bf33c5b77bdfa882f by Sven Gothel
GlueGen: Refine compound [array] call-by-value native code injection and initialization

Follow-up of commit 9843e983a4fc71a64eb3de9cb364a1f4ffa56b3a

Only add static initialization code (java, native)
and hence native code 'JVMUtil_NewDirectByteBufferCopy(..)'
if either required _or_ forced via configuration.

This shall reduce possible sideffects
and dead code.

Add JavaConfiguration:

/**
* Returns true if the static initialization java code calling <code>initializeImpl()</code>
* for the given class will be manually implemented by the end user
* as requested via configuration directive <code>ManualStaticInitCall 'class-name'</code>.
*/
public boolean manualStaticInitCall(String clazzName);

/**
* Returns true if the static initialization java code implementing <code>initializeImpl()</code>
* and the native code implementing:
* <pre>
*   static jobject JVMUtil_NewDirectByteBufferCopy(JNIEnv *env, void * source_address, jlong capacity);
* </pre>
* for the given class will be included in the generated code, always,
* as requested via configuration directive <code>ForceStaticInitCode 'class-name'</code>.
* <p>
* If case above code has been generated, static class initialization is generated
* to call <code>initializeImpl()</code>, see {@link #manualStaticInitCall(String)}.
* </p>
*/
public boolean forceStaticInitCode(String clazzName);
The file was modified src/java/com/jogamp/gluegen/JavaEmitter.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaConfiguration.java (diff)
Commit 2f6586292cd298bbc19d8acda0f7cf303c82078b by Sven Gothel
GlueGen: Refine compound [array] call-by-value native code injection and initialization

Follow-up of commit 1eadaf928f4f61aae4de1c8bf33c5b77bdfa882f

- Refine MethodBinding detection for 'requiresStaticInitialization',
  i.e. return type is a "compound type" and not a pointer

- JVMUtil_NewDirectByteBufferCopy: Throw FatalError if initializeImpl() has not been called
The file was modified src/java/com/jogamp/gluegen/MethodBinding.java (diff)
The file was modified src/java/com/jogamp/gluegen/JavaEmitter.java (diff)