summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1015: Test executable permission on Windows via bat file (temp dir, like ↵Sven Gothel2014-08-284-41/+143
| | | | | | | | | | | | | | | | | | | | | | | | on unix and osx) Tested on Window 7 and Windows 8.1 using 'Using Software Restriction Policies', i.e. disabled sw-execution in TEMP dir. On Windows we need to add min. shell code, here 'echo off', allowing the bat file to be executed if policy allows it. Reminder: We test the following temp folder 1) java.io.tmpdir/jogamp 2) $XDG_CACHE_HOME/jogamp 3) $TMPDIR/jogamp or $TEMP/jogamp 4) $HOME/.jogamp +++ Misc: Proper 'duplicate' validation via 'file1.equals(file2)' test using the abstract pathname.
* Scripts: Bump to java 1.7.0_67 and apache-ant 1.9.4Sven Gothel2014-08-284-13/+13
|
* IntIntHashMap: Reduce temp. ArrayList<Entry> instances in cloneSven Gothel2014-08-165-8/+15
|
* Bump to 2.2.1-rcSven Gothel2014-08-071-3/+3
|
* Bump to 2.2.0v2.2.0Sven Gothel2014-08-061-2/+2
|
* gluegen-cpptasks's compiler.cfg.linux.*: always "-include ↵Sven Gothel2014-07-304-0/+14
| | | | make/stub_includes/platform/glibc-compat-symbols.h" ensuring using low versioned GLIBC symbols
* Bug 1024: Add fallback for native-jar-file location via classpathSven Gothel2014-07-116-18/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In situations, where the native-jar file is not located within the same parent URI as it's java-jar file, our location mechanism fails. This patch adds a classloader based native-jar file location mechanism as a fallback, requiring the native jar file to be included in the users CLASSPATH. Classloader based location algorithm in JNILibLoaderBase.addNativeJarLibsImpl(..): - Extract the 'module-name' from the given classFromJavaJar's package name, i.e. the last package-part: 'jogamp.common.Debug' -> 'common' Hence it is important to pass a 'classFromJavaJar', which last package segment reflects the module-name! - <os.and.arch> -> <os_and_arch_dot>, e.g. linux-amd64 -> linux.amd64 (linux/amd64) - Locate class 'jogamp.nativetag.<module-name>.<os_and_arch_dot>.TAG', e.g. 'jogamp.nativetag.common.linux.amd64.TAG' - Use located class's JarFile URI .. continue as usual Injection of above mentioned TAG class via gluegen-cpptasks-base.xml macro 'native.tag.jar': - Creates dummy TAG.java code - Compiles TAG.java - Creates the native-jar file Example: <native.tag.jar objdir="${build}/obj" nativejarfile="${build}/gluegen-rt-natives-${os.and.arch}.jar" manifestfile="${build}/Manifest-rt-natives.temp" module="common" includelibs="*gluegen-rt.${native.library.suffix}" /> Note that the manifest file uses a matching Extension-Name: Extension-Name: jogamp.nativetag.common
* Cleanup JNILibLoaderBase: Use Platform NEWLINE, remove obsolete notice of ↵Sven Gothel2014-07-111-21/+26
| | | | | | | '[-noawt,-mobile,-core,-android]?' in API-doc, ... - rename addNativeJarLibsWhenInitialized(..) -> addNativeJarLibsWithTempJarCache(..) to fix grammar and expose proper semantics.
* Debug: Use JogAmp license, since we re-modelled it using PropertyAccess, ↵Sven Gothel2014-07-111-33/+21
| | | | commit GlueGen f4ac27e177f6deb444280d3b375e7d343e38bd08
* PlatformPropsImpl.getOSAndArch(..): Cleanup, use final String instances to ↵Sven Gothel2014-07-111-22/+33
| | | | ease review
* Bug 1023/Bug 1024: Create native jar files for different configurations due ↵Sven Gothel2014-07-101-1/+2
| | | | to non-native-jar aliasing
* Remove @deprecated methodsSven Gothel2014-07-094-24/+0
|
* gluegen: relax private variable access to package-private for members ↵Harvey Harrison2014-07-072-2/+2
| | | | | | | accessed from inner class Otherwise the compiler has to fill in a wrapping access function for the inner class to call, which is less efficient.
* gluegen: remove the unused reverse map from TypeDictionaryHarvey Harrison2014-07-071-9/+0
|
* gluegen: remove unused imports, unneeded semicolons, add missing @Override ↵Harvey Harrison2014-07-076-6/+7
| | | | annotations
* Merge remote-tracking branch 'github-mark/master' (Bug 1023, Bug 1024)Sven Gothel2014-07-053-154/+130
|\ | | | | | | | | | | | | | | | | Conflicts: src/java/com/jogamp/common/jvm/JNILibLoaderBase.java src/java/com/jogamp/common/os/Platform.java src/junit/com/jogamp/common/util/TestTempJarCache.java (re-injected that api-doc of addNativeJarLibsImpl)
| * Do not keep re-indexing into the same array.Mark Raynsford2014-06-301-4/+4
| |
| * StringBuilder message parameter was unused.Mark Raynsford2014-06-301-4/+3
| |
| * Clean up native library loading and remove the ability to strip prefixes.Mark Raynsford2014-06-302-110/+132
| | | | | | | | | | Bug: 1023 Bug: 1024
| * Remove unused addNativeJarLibs() method; the only consumer was a unit testMark Raynsford2014-06-262-54/+0
| | | | | | | | of the method.
* | Code Clean-Up based on our Recommended Settings (jogamp-scripting ↵Sven Gothel2014-07-03200-3843/+3837
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
* | Fix 'typo' in messages: 'Catched' -> 'Caught'Sven Gothel2014-06-289-19/+19
| |
* | Buffers: Split slice2Float(..) into dedicated methods for FloatBuffer and ↵Sven Gothel2014-06-271-32/+53
|/ | | | float[] backing-array - refine API doc w/ backing-array semantics
* CMethodBindingEmitter: Suppress compiler warning in NewDirectByteBuffer ↵Sven Gothel2014-06-251-2/+2
| | | | usage (cast to void*)
* Bug 1025 - GlueGen: Fix regression of single non-native sized compound fieldsSven Gothel2014-06-251-5/+21
| | | | | Single non-native sized compound fields, if an opaque array/pointer, must utilized the native size StructAccessor get/set method.
* Bug 1025 - GlueGen: Fix test case (gcc compiler regression due to redefined ↵Sven Gothel2014-06-252-10/+0
| | | | types / removed them)
* Bug 1025 - GlueGen: Add accessor for compound fields of type array, pointer ↵Sven Gothel2014-06-2523-433/+1886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and string (code generation) Enhance compound access as delivered by Bug 1022, to also generate accessors (getter and setter) for array, pointer and string types. Allow configuration of array length either via their internal size (c-header) or config 'ReturnedArrayLength'. 'ReturnedArrayLength' allows specifying a java expression. Canonical field names of compounds are _now_ specified as follows for configuration entries: COMPOUND.FIELD e.g. StructA.fieldB Also allow configuration of pointer fields to be treated as referenced arrays via 'ReturnedArrayLength'. Further, allow specifying 'pointer fields' as String values via 'ReturnsString' configuration. ++++ Implementation details: - handle above described accessor features - enhance JavaDoc for generated accessors - generate native JNI compound and string accessor on demand - encapsule accessor code generation in their own methods - enhance exception messages - enhance type verbosity in debug mode - verbose debug output via GlueGen.debug() Tests: - Features covered by test1.[ch] and Test1p1JavaEmitter and Test1p2ProcAddressEmitter - Validated compilation and unit tests for modules: - joal - jogl (minor config changes req.) - jocl (minor config changes req.)
* GlueGen: Add support for compound-array in structs (accessors) ; Allow using ↵Sven Gothel2014-06-197-61/+212
| | | | | | | | | | | | | | | C-Enum values for array length - Parser (HeaderParser.g): Support using C-Enum values for array length specification - Will throw an exception if enum identifier is unknown or exceeds int-size - Add StructEmitter supports for compound-arrays - Add Debug stderr verbose info: - Struct Emitter prefix 'SE.' - to analyze emitting struct fields (offset+size and accessors) - Struct Layout prefix 'SL.' - to analyze memory layout (based on MachineDescription.StaticConfig.X86_64_UNIX) Tested via test1.[ch] BaseClass ..
* Bump cpptasks.jar to commit 9a66c005a3cd304c4b47abd9a287a60e3545b9daSven Gothel2014-06-181-0/+0
|
* GlueGen: Refine compound [array] call-by-value native code injection and ↵Sven Gothel2014-06-182-7/+46
| | | | | | | | | | | 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
* GlueGen: Refine compound [array] call-by-value native code injection and ↵Sven Gothel2014-06-182-175/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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);
* Fix commit f4e753ff1f39be381307ffdb0fb6bb7a2d323eff: 'compound array ↵Sven Gothel2014-06-174-97/+176
| | | | call-by-value' JavaMethodBindingEmitter, array may still require NIO handling, also consider NIO array length.
* GlueGen: Add support for 'compound array call-by-value'Sven Gothel2014-06-1712-110/+201
| | | | | | | | | | | | | | | | | | | | | | | | | 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!
* TestVersionSemantics: No more expecting BACKWARD_COMPATIBLE* (Due to bumping ↵Sven Gothel2014-06-171-1/+1
| | | | to 2.2.0)
* complete commit 33eb9484c4675423431521f2271e3e9d8d38f3b2Sven Gothel2014-06-171-1/+1
|
* gluegen: move all antlr grammars to a top-level directory (refine commit ↵Sven Gothel2014-06-176-0/+0
| | | | | | e8bc9edd3c39170af038ab23b8cdca9ffd6f2d56): src/antlr (IMHO no need for 'main') /src/main/antlr/ -> /src/antlr/
* Merge remote-tracking branch 'hharrison/antlr-move'Sven Gothel2014-06-1715-104/+93
|\
| * gluegen: update HeaderParser grammar to annotation EnumType map and ↵Harvey Harrison2014-05-312-12/+11
| | | | | | | | | | | | functions list Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: remove some unused importsHarvey Harrison2014-05-315-6/+0
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: update the target names for generating java codeHarvey Harrison2014-05-311-45/+45
| | | | | | | | | | | | Also move the antlr-wrapping targets to be near the one place they are used. Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: pair the grammer input folder with an out.dir valueHarvey Harrison2014-05-311-12/+12
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: move all antlr grammars to a top-level directoryHarvey Harrison2014-05-317-10/+9
| | | | | | | | | | | | | | | | /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 <[email protected]>
| * gluegen: update antlr grammer to produce annotated enum and functionName setsHarvey Harrison2014-05-182-17/+15
| | | | | | | | | | | | | | The annotations are all commented out, uncomment them and reduce the type warnings during the build. Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: remove an unreferenced writer variableHarvey Harrison2014-05-181-1/+0
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
| * gluegen: avoid a suppressed warning annotation by using the ArrayList copy ↵Harvey Harrison2014-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* | GlueGen: Add support for 'compound call-by-value', i.e. passing and ↵Sven Gothel2014-06-1711-176/+457
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* | ReflectionUtil.getConstructor: Add 'initializeClazz' argument, allowing to ↵Sven Gothel2014-06-172-10/+11
| | | | | | | | defer static class initialization
* | Minor edits: space, final qualifier; setenv-build-*: Add generic JDK locationSven Gothel2014-06-174-2/+28
| |
* | JavaEmitter.typeToJavaType: Simplify if-else block ; ↵Sven Gothel2014-06-162-5/+5
| | | | | | | | JavaType.getDumpString(): Add more info ..
* | OSX Build: Default gcc.compat.compiler=xcode.clang ; Remove explicit ↵Sven Gothel2014-06-114-32/+11
| | | | | | | | xcode.clang property files