aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1149 - Replacing PCPP w/ JCPP, allowing complete macro handling (Part-1: ↵Sven Gothel2015-03-2311-146/+356
| | | | Cleanup / Preparation)
* Fix DynamicLibraryBundle.isToolLibComplete() no tool-lib case, regression of ↵Sven Gothel2015-03-181-1/+4
| | | | | | | | | | | | | | | commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8 Regression of commit 12feaa7d3b1544098f684d851e3caff1ec88cbc8 'isToolLibComplete()' returned false if dynLinkGlobal is null, even if no tool-lib has been used. In which case dynLinkGlobal has not been initialized and hence is always null. 'isToolLibComplete()' now takes no tool-lib into consideration! Currently only 'OVRDynamicLibraryBundleInfo' of JOGL's 'oculusvr' binding used this configuration within JogAmp.
* Bug 1144 - Fix commit bbea09816015ecf3596acdcc033553127fcc0ef3 (missing file)v2.3.0Sven Gothel2015-03-111-0/+7
|
* Bug 1144 - Add 'DelegateImplementation': Requires own MethodBinding for ↵Sven Gothel2015-03-118-58/+128
| | | | | | | | | | | | | | | | | | | | | | delegates impl. / Adding ReturnsOpaque - DelegateImplementation requires own MethodBinding for delegates impl. The delegation name must be included within the FunctionSymbol's aliases _only_ for implementations, where delegation applies. This allows all subsequent type/cfg checks to hit on AliasedSymbol! Hence we need to create individual MethodBinding instances for interfaces and public/private implementations. - Adding ReturnsOpaque Configuration: ReturnsOpaque <Primitive Java Type> <Function Name> This feature is necessary to achieve 'Opaque' functionality for function's return type - instead of types in general. - Fix AliasedSymbolImpl copy-ctor, i.e. this.name = o.name !
* Bug 1134 - LOG AliasedSymbol: Don't issue getAliasedString(), logger takes ↵Sven Gothel2015-03-114-18/+18
| | | | care of that, when it logs.
* Bug 1144 - Add 'DelegateImplementation', manually impl. may delegate to ↵Sven Gothel2015-03-117-10/+124
| | | | | | | | | | | | | | | | | | | | | | | | renamed original 'DelegateImplementation' is a variation of 'ManuallyImplement'. 'ManuallyImplement' emits the interface method, but suppresses the Java and native-code implementation. The latter shall be implemented manually by the user. 'DelegateImplementation' emits the interface method, and the _private_ renamed Java and native-code implementation. Both can be called from the manual user implementation, hence delegation. Configuration: DelegateImplementation <ORIG-SYMBOL> <RENAMED-IMPL-SYMBOL> I.e. delegation model shall apply to <ORIG-SYMBOL> and the Java and native-code implementation renamed to <RENAMED-IMPL-SYMBOL>. The user manual implementation of <ORIG-SYMBOL> may delegate to <RENAMED-IMPL-SYMBOL>.
* Bug 1144 - Add 'DelegateImplementation': Cleanup ↵Sven Gothel2015-03-119-118/+197
| | | | | | | | MethodBinding/FunctionBinding Semantics - Clarify name semantics: name -> [interfaceName, implName, nativeName] - JavaMethodBindingEmitter: Refine native identity via isNativeMethod + isPrivateNativeMethod - ProcAddressEmitter: Remove hack whether we need to wrap .. use isNativeMethod + isPrivateNativeMethod
* Bug 1144 - Add 'DelegateImplementation': Sort JavaMethodBindingEmitter ↵Sven Gothel2015-03-104-48/+51
| | | | argument list; forImplementingMethodCall -> isNativeMethod
* Bug 1144 - Add 'DelegateImplementation': Cleanup JavaConfiguration and use ↵Sven Gothel2015-03-102-65/+83
| | | | manuallyImplement(AliasedSymbol) for FunctionSymbol
* Bug 1134 - Refine err/log message of 'previous definition is here'Sven Gothel2015-03-092-6/+6
|
* Bug 1134 - Add ASTLocusTagProvider for Define and fix newline in c-parser ↵Sven Gothel2015-03-095-9/+29
| | | | (Expose source location for log/error messages)
* Bug 1134 - In case of 'undefined type' throw a semantic GlueGenException ↵Sven Gothel2015-03-091-1/+7
| | | | instead of an NPE
* Bug 1134 - Fix CMethodBindingEmitter return type '_res' qualifiers (part 2)Sven Gothel2015-03-092-2/+13
| | | | | | | | | Commit 414a0146660cadd35d5ae270f7f819717e9c7374 removed the const/volatile of the local return variable. This change also casts the function calling result to the same - hence removing a possible c-compiler warning of dropping qualifier const.
* Bug 1134 - ProcAddressCMethodBindingEmitter: Use available 'ProcAddrTypedef' ↵Sven Gothel2015-03-092-39/+43
| | | | | | | | | | | | | | | | | for type validation w/ local generated variant (robustness) ProcAddressCMethodBindingEmitter code regarding having the public 'ProcAddrTypedef' (from input header) was simply broken, since it always used the local generated 'ProcAddrTypedef', if 'ProcAddrTypedef' was forced. Hence the public 'ProcAddrTypedef' was ignored in most cases. ProcAddressCMethodBindingEmitter's semantic changed from: needsLocalTypedef -> hasProcAddrTypedef New Code generation: - always generated the local 'ProcAddrTypedef' - if hasProcAddrTypedef, use public 'ProcAddrTypedef' for return type variable - cast local 'ProcAddrTypedef' to public 'ProcAddrTypedef', which renders the native compiler to validate the local and public types.
* 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-098-142/+214
| | | | | | | | | | | | | | | | | | | | | | - 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-063-10/+60
| | | | 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-065-65/+115
| | | | 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-0543-833/+2486
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* Bug 1126 - Remove static query requirement of MachineDescriptor, find ↵Sven Gothel2015-02-0227-373/+504
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0120-1007/+1425
| | | | | | | | | | | | | | | | | | | | | | | | | 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!
* 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-305-75/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 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 ..
* 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-137-21/+1011
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* 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-111-1/+9
| | | | | | | | | | | | 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.