summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1134 - Fix CMethodBindingEmitter return type '_res' qualifiersSven Gothel2015-03-091-2/+3
| | | | | We cannot have the local variable holding the return type 'const' and assign a value to it later.
* Bug 1134 - Fix aliased typedef struct emissionSven Gothel2015-03-099-144/+216
| | | | | | | | | | | | | | | | | | | | | | - Code regarding 'aliased typedef struct' is tagged in JavaEmitter and HeaderParser: 'NOTE: Struct Name Resolution (JavaEmitter, HeaderParser)' Prefers containing cstruct typedef pointer if available _and_ if cstruct is _not_ a typedef! - Removed: 'HeaderParser.resolveAnonCompound(..)' no more required, since CompoundType always sets its name! Commit cf9f28cf249393f42d7d2835775521dfadee6b92 - JavaEmitter.emitStruct: - Regard above 'aliased typedef struct' NOTE - JavaEmitter.typeToJavaType: - Regard above 'aliased typedef struct' NOTE - ReferencedStructs - Drop duplicate CompoundType instances of same name. This can happen due to const/volatile and ASTLocusTag variants.
* Bug 1134 - Fix IntType 'unsigned'; Type: Use copy-ctor instead of Clonable, ..Sven Gothel2015-03-0921-273/+315
| | | | | | | | | | | | - Fix IntType 'unsigned' - Need to handle 'unsigned' for typedef and !typedef, when exposing 'unsigned' for code emission. - Consider IntType.typedefUnsigned in hash/equals - Type: Use copy-ctor instead of Clonable enhancing strong typing. - add 'Type clone(final ASTLocusTag newLoc)' - Consider Type.typedefCVAttributes in hash/equals
* Bug 1134 - Make ASTLocusTag's text optionalSven Gothel2015-03-093-7/+15
|
* Bug 1134 - Logging's formatter now takes care of Type -> getDebugString() ↵Sven Gothel2015-03-083-43/+72
| | | | | | | when desired, not at 'log' call Removes load to assemble the getDebugString() of Type and JavaType when invoking log function. Note: the log may be skipped if log-level is not reached.
* Bug 1134 - Use ASTLocationTag in Logging (PCPP, Emitter); Refine ↵Sven Gothel2015-03-0815-191/+289
| | | | | | | | ASTLocationTag log/exception formatting. Since commit eca019cdea4017227e951d8a9eb30cb34fca4a07, we have ASTLocationTag available. Hence use it for all logging purposes and emit a standard compiler output, which shall be parsable by other tools.
* Fix Type.getDebugString() comma separationSven Gothel2015-03-071-53/+59
|
* Bug 1134 - Fix IntType: Add getCName(..) for proper C-type code; Fix its ↵Sven Gothel2015-03-073-44/+55
| | | | | | | | | | | | | | | newCVVariant(..), don't pass given cv-attr as typedef Add getCName(..) for proper C-type code - Add 'unsigned ' if not typedef and is unsigned. - Allows removal of special case in CMethodBindingEmitter - Fixes ProcAddressCMethodBindingEmitter typedef emission and removes clang warnings, caused by this (many). Fix its newCVVariant(..), don't pass given cv-attr as typedef - Proper delegation of 'const', regression of prev. commits
* Bug 1134 - Handle Opaque fields in structs; Print struct field name in ↵Sven Gothel2015-03-074-35/+64
| | | | apidoc of getter/setter
* Bug 1134 - Pass ASTLocationTag to all types, used for GlueGenExceptionSven Gothel2015-03-0723-249/+411
| | | | | Enhances semantic exception in code generation by adding the AST location of the type or function declaration.
* TestByteBuffer*Stream: Reduce mmap load on poor OSX mini test machine to ↵Sven Gothel2015-03-064-12/+62
| | | | reduce test time (was: > 10 min)
* Bug 1134 - Fix regression on OpenSolaris/gcc: Redefine in test1.h (test case)Sven Gothel2015-03-061-1/+1
|
* Bug 1134 - GlueGenException.toString(): Produce a 'gcc' like/compatible ↵Sven Gothel2015-03-062-5/+13
| | | | error message
* Bug 1134 - Fix ProcAddressEmitter.getFunctionPointerTypedefName() ; Fix ↵Sven Gothel2015-03-063-6/+17
| | | | | | | | | | | JavaEmitter's Function/Struct Emission Fix ProcAddressEmitter.getFunctionPointerTypedefName(): - needs to produce function-pointer-type name w/ original name Fix JavaEmitter's Function/Struct Emission: - needs to create FunctionSymbol w/ original native name, - then rename - preserving the original one.
* Bug 1134 - Utilize AliasedSymbol where required in *Configuration; Clarify ↵Sven Gothel2015-03-066-68/+121
| | | | ProcAddressEmitter criteria
* Bug 1134 - Refine Logging using 'LoggerIf' - Replace System.err w/ Logging ↵Sven Gothel2015-03-068-156/+263
| | | | where appropriate
* Bug 1134 - Add ASTLocationTag, locating source of [semantic] errors while ↵Sven Gothel2015-03-069-38/+333
| | | | | | | parsing / analyzing New GlueGenException supports ASTLocationTag, which will be throws in case of semantic and/or parsing errors.
* Bug 1134 - Fix regression: Static C-Function call must use original API nameSven Gothel2015-03-054-4/+24
| | | | | | | | | - Regression of commit 72d3635279ffc8ad88e47dff9bbe95d211226d11 CMethodBindingEmitter emits statically linked function calls, hence needs to use the original name of AliasedSymbol. AliasedSymbol: Add 'getOrigName()' at creation!
* Bug 1134 - Enhance GlueGen Compiler: Minimal GL Header Changes _and_ TypesafetySven Gothel2015-03-0545-835/+2489
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - We shall be able to import 'most' vanilla GL header, i.e. only change the typedef part using our GlueGen types - Type Safety: - GlueGen now detects '#define' and 'enum' redefines and throw an exception in this case. This helps detecting wrongly renamed GL extensions into core! - GlueGen now detects function redefines (overloading) and throw an exception in this case. Hence the semantics of duplicate functions has to be equal! This helps detecting wrongly renamed GL extensions into core! - Semantic equality for all types is provided via interface TypeComparator.SemanticEqualityOp, i.e. 'boolean equalSemantics(..)' implemented by com.jogamp.gluegen.cgram.types.Type. Semantic equality can be relaxed via config "RelaxedEqualSemanticsTest true", i.e. ignoring integer size, and const / volatile qualifiers. - All equality/hash methods of 'com.jogamp.gluegen.cgram.types.*' are restructured. - Track and simplify renamed 'symbol', i.e. use a common sub-interface for all renamed symbols (ConstantDefinition, FunctionSymbol, ..) - This is provided in a unified manner via interface com.jogamp.gluegen.cgram.types.AliasedSymbol and its common implementation AliasedSymbolImpl - All JavaConfiguration.shouldIgnore* methods operate w/ 'AliasedSymbol' trying to match all aliases. - Support 'struct NAME [ { ... } ]' w/o typedef's - New GL / CL headers do not use typedef's for anonymous opaque types - Opaque Type handling - JavaConfiguration.typeInfo(..), identifying opaque types, no more back references from target-type -> typedef. Hence the following is possible now: typedef void * Opaque01; // Opaque typedef void * APointerBuffer; // A Buffer - All Logger instances are no more static and derive their warning level from the package's root Logger via Logging.getLogger(..).
* Refine commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8: Add 'throws ↵Sven Gothel2015-02-053-13/+20
| | | | SecurityException' decl., remove dead code, remove redundant check.
* build setup script: remove redundant ANT_PATH entrySven Gothel2015-02-051-7/+0
|
* Fix regression of commit 3caf446e29a3934900b9983dfd72cb8aa0d9e8d7: Win64 is ↵Sven Gothel2015-02-031-2/+0
| | | | not LP64
* Add javadoc arg '-Xdoclint:none' if java >= 1.8 via property 'javadoc.xarg1' ↵Sven Gothel2015-02-032-5/+17
| | | | avoiding javadoc build failure
* GlueGen: Adapt APK install scripts for harmonized os.and.arch names, see ↵Sven Gothel2015-02-026-11/+4
| | | | commit 3b43a223253176731567c6d8b7a67c9a6110782b
* GlueGen AAPT Task: Android APK native-code files shall be named using ↵Sven Gothel2015-02-022-15/+50
| | | | 'os.and.arch', instead of android.abi for harmonization
* Remove unused armv7 scripts and gluegen pieceSven Gothel2015-02-023-246/+0
|
* Bug 1126 - Remove static query requirement of MachineDescriptor, find ↵Sven Gothel2015-02-0231-382/+515
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues. Currently the StaticConfig is being queried via the key[OSType, CPUType ..] as pre-determined by Java properties or the ELF parser. This adds complication to maintain different platforms and the key query might not even be sufficient. The MachineDescriptor's StaticConfig only purpose shall be to speed-up native data size and offset/alignment retrieval. This is done by using the StaticConfig index within all StaticConfig[]s as a lookup-index for the precomputed struct's size and offset tables. +++ Solution: Rename: MachineDescriptor -> MachineDataInfo Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime After having defined os.and.arch (OSType, CPUType and ABIType) w/ the optional help of the now self containing ELF Reader (Bug 1125), the native gluegen-rt library gets loaded enabling JNI methods. It is satisfactory to retrieve MachineDataInfo at runtime w/ JNI and find the matching/compatible StaticConfig. Only in case none is found, the program needs to abort. Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo are stored for further use (see above). This removes above complication and key to StaticConfig mapping. New platforms simply need to add a new unique entry into the StaticConfig[] table. ++ Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org, and Bug 1014 (MIPSLE), thanks to Dejan Latinovic. Parts of the patch for Bug 1014 from Dejan Latinovic are included. also solved by this change set.
* Minor Cleanup: Buffers: Remove !JAVA_6 branch; NativeLibrary: Reuse isOSX ↵Sven Gothel2015-02-012-43/+21
| | | | detection
* Bug 1125 - Make ELF Reader 'jogamp.common.os.elf' StatelessSven Gothel2015-02-0123-1011/+1486
| | | | | | | | | | | | | | | | | | | | | | | | | ELF Reader 'jogamp.common.os.elf' currently uses Platform's pre-determined OS_TYPE and CPUType. It also uses the host platforms MachineDescription, hence can not read ELF files from other machines. This also forbids Platform to determine CPUType etc w/o having a valid 'os.arch' property. +++ ElfHeader should be split in - ElfHeaderPart1 (CPUType independent) - ElfHeaderPart2 (CPUType dependent) Fix shall make the ELF Reader self containing by only using ELF CPUType data, etc. This requires customization of struct parsing, where MachineDescription.Static index shall be - defined in ElfHeaderPart1 using e_Ident's CPUType. - used in ElfHeaderPart2 and all its struct types.
* Bug 1122: Refine AArch64 and OSType/32Bit incl. MachineDescriptionSven Gothel2015-01-307-100/+64
| | | | | | | | | | | | Android: - Detect ABIType.EABI_GNU_ARMHF via 'armeabi-v7a-hard' Platform.CPUType: - contains is32Bit now MachineDescription: - Rename *x86_64_unix* -> *lp64_unix*, reflecting universal __LP64__ mode - Remove is32Bit, which is determined by CPUType
* Refine Native Library Code: Bulk Permissions, Cleanup DynamicLinker impl. - ↵Sven Gothel2015-01-3012-172/+402
| | | | | | | | | | | | | | | and fix Android AArch64 BionicDynamicLinker (Bug 1122) - Bulk Permissions ProcAddressTable.reset(..) performs address lookup in one block. Now claiming all permissions upfront once, and releasing them afterwards. - Cleanup DynamicLinker impl. Proper top-down impl. of DynamicLinkerImpl, handling all security code and validations. - Fix Android AArch64 BionicDynamicLinker (Bug 1122) Dalvik uses diff RTLD_* defines for AArch64!
* Bug 1122: Reflect __LP64__ and _aarch64__ in GlueGen's stdint/stddef and ↵Sven Gothel2015-01-307-26/+80
| | | | Android compilerflags
* GlueGen: Cleanup static generated JNI code (fix method names)Sven Gothel2015-01-303-36/+55
| | | | | Symbol could not be found w/ Android: UnixDynamicLinkerImpl_JNI.c::Java_jogamp_common_os_UnixDynamicLinkerImpl_dlerror
* Bug 1122: Add AArch64 support (Android, GNU/Linux and in general)Sven Gothel2015-01-3010-78/+344
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add AArch64 detection via - Elf Parser - Android properties - Java properties - Android: Validate CPUType.Family _and_ ABIType - MachineDescription - Remove redundant Type ID and its field - Reuse X86_64_UNIX for AArch64 (static config) New ARCH 'aarch64' for ant: <os arch> armv8a aarch64 New CPUType.ARM64 (ARM): java: os.arch aarch64 arm64 New CPUType.ARMv8_A (ARM): java: os.arch armv8-a arm64-v8a New ABIType: EABI_AARCH64
* Bug 1122 - Elf Parser: EM_res183 -> EM_AARCH64, detecting AArch64; Updating ↵Sven Gothel2015-01-303-68/+182
| | | | Shdr and Ehdr via GlueGen
* GlueGen: Make const array-length getter static, if constant.Sven Gothel2015-01-301-18/+26
|
* Bug 1122 - Add Android API 21 jar file and source zipSven Gothel2015-01-305-0/+213
|
* Bug 1123 - Android Launcher/ClassLoaderUtil: Fails to work w/ Android 5.* ↵Sven Gothel2015-01-281-0/+48
| | | | | | | | | | | | | | | | (lollipop/art) Our Android ClassLoaderUtil, used to daisy chain dex ClassLoader using GlueGen, Joal and Jogl APK files, doesn't work on Android 5.* (lollipop) with the art runtime. See below adb log. Seems like this is a known issue https://code.google.com/p/android/issues/detail?id=82122 Workaround mentioned is to copy the APK file(s) to a temp directory ..
* Bug 1124 - Android Build: Use SDK >= 24.0.2 (build-tools >= 21.1.2) and NDK ↵Sven Gothel2015-01-284-105/+94
| | | | | | | >= 10d Adjust build scripts and GlueGen Android tasks for SDK >= 24.0.2 (build-tools >= 21.1.2) and NDK >= 10d
* ExceptionUtils.dumpThrowable(..): Also dump all causes of the given ThrowableSven Gothel2015-01-231-0/+9
|
* ProcAddressConfiguration: Allow setting default value for ↵Sven Gothel2014-12-181-1/+4
| | | | 'GetProcAddressTableExpr'
* Bug 1108 - Fix difficulties to determine executable access permission on ↵Sven Gothel2014-12-138-21/+1020
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Windows via BATCH file execution Batch file execution test via direct call, i.e.'a.bat', does not work on some Windows machine, not reproducible here! A workaround would be to call the batch file explicit via 'CMD /c a.bat': - works when using 'Software Restriction Policies' (Bug 1015 Comment 2) - does _not_ work when denying ACL "Traverse Folder / Execute File" permission (Bug 1015 Comment 3) Due to this bug, we need to use a native execution: - Performing executable test w/ native exe file instead of batch file on Windows x86 32bit and 64bit, - using [1] TinyPE XP-W8 Compatible - x86 32bit and 64bit - 268 bytes - Tested on: WinXP-32bit, Win7-64bit and Win8-64bit - Author/License: Ange Albertini, BSD Licence, 2010-2013 - On all other Windows machines (ARM, ..), we still use direct execution of 'a.bat' but may add native exe files for missing platforms. +++ This patch injects said binaries within the java jar file and copies it into the 'to be tested' temp folder for execution. [1] TinyPE XP-W8 Compatible - x86 32bit and 64bit - 268 bytes is included within 'src/native/tinype-corkami', build manually and imported as 'src/java/com/jogamp/common/util/bin/exe-windows-i586-268b.bin'. +++
* TempFileCache/TempJarCache: Fix NPE in DEBUG modeSven Gothel2014-12-122-2/+7
|
* test scripts: Bump JRE, add TEMP/TMP settingsSven Gothel2014-12-128-22/+36
|
* GlueGen JavaEmitter: Use proper class access modifiers for emitted classes ↵Sven Gothel2014-12-113-20/+32
| | | | | | | incl. ProcAddressTable Emitted Java classes as well as optional ProcAddressTable shall use unique generated access modifiers covering all MethodAccess cases.
* Bug 1108 - IOUtil.getTempDir(..): Difficulties to determine executable ↵Sven Gothel2014-12-114-13/+19
| | | | | | | | | | | | access permission on Windows via BATCH file execution Try using explicit call to Windows 'cmd.exe' w/ referencing the BATCH file location, via 'Runtime.getRuntime().exec(new String[] { "cmd", "/c", "a.bat" } );' While the bug itself could not be reproduced here, I could test on Windows 7 (64bit and 32bit), as well as an WindowsXP 32bit that no regression occured.
* Bug 1106 - Bitstream: Simplify 'msbFirst' case for bulk operations / Add ↵Sven Gothel2014-12-037-327/+595
| | | | | | | | | | | | | | | | | | | | | | | setting of stream position (optional) - Add setting position entry, optionally supported, e.g. ByteBufferStream and ByteArrayStream - Remove 'msbFirst' parameter on all 'bulk' read/write operations. These methods use LSB-first always, allowing proper stream access of data w/ different bit-sizes. Data is now read/write as little-endian and swapped accordingly. Optimizations are adopted for LSB-first operations. This change removes API confusion/bugs: - removes one decision (parameter) - removes the data reversion case - removes bugs w/ different bit-sizes
* ExceptionUtils.dumpStack(..): Skip self stack entrySven Gothel2014-12-031-1/+1
|
* Refine ExceptionUtils: Shorten method name, dumpThrowable uses dumpStackSven Gothel2014-10-263-10/+21
|
* Add ExceptionUtils: Exposing dumpStackTrace(..) and dumpThrowable(..)Sven Gothel2014-10-081-0/+60
|