Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | GlueGen: Move [de]captializeString(..) JavaEmitter -> static in CodeGenUtils | Sven Gothel | 2023-06-29 | 2 | -7/+21 |
| | |||||
* | GlueGen LibraryOnLoad Config: Generate `JNI_OnLoad(..)` for dynamic and ↵ | Sven Gothel | 2023-06-29 | 3 | -4/+125 |
| | | | | `JNI_OnLoad_<LibraryBasename>(..)` for static libraries and `JVMUtil_GetJNIEnv(..)` to resolve the `JNIEnv*` as used by JavaCallback | ||||
* | GlueGen Struct [17]: Handle void pointers, i.e. `void*`, within a struct as ↵ | Sven Gothel | 2023-06-29 | 2 | -10/+11 |
| | | | | | | `Opaque` configured pointer-types .. includes cross-ref'ed doc and unit test | ||||
* | GlueGen JavaCallback: Add JavaCallback.methodSignature to JNI arg-list and ↵ | Sven Gothel | 2023-06-26 | 1 | -0/+16 |
| | | | | pass value at invocation, allowing to find the jmethodID of callback | ||||
* | GlueGen JavaCallback: Move JavaCallback into JavaConfiguration, accessible ↵ | Sven Gothel | 2023-06-26 | 2 | -52/+82 |
| | | | | across *Emitter (needed for CMethodEmitter as well); Add JavaCallback.methodSignature to be passed to native function later on to find the callback jmethodID | ||||
* | GlueGen JavaCallback: Expose getJNIMethodDescriptor() for JNI mangled method ↵ | Sven Gothel | 2023-06-26 | 3 | -14/+49 |
| | | | | names, used in CMethodBindingEmitter; Use JavaCallback's function-pointer-type capital-name as simple-class-name and its FQN for JNI resolution. | ||||
* | GlueGen JavaCallback: Use new JavaType nature 'named-class', denoting the ↵ | Sven Gothel | 2023-06-26 | 2 | -1/+5 |
| | | | | | | | | | | | | generated callback interface mapping the callback function. This passes the jobject for the callback function/interface and the userParam (from 'void*') down to the native implementation. TODO: Add specific native implementation for JavaCallback, wrapping the jobject's into a native struct as user-param and a universal C-function as the native callback to dispatch the call to the java method with known arguments. | ||||
* | GlueGen JavaType: Add new nature 'String clazzName': Future (not yet ↵ | Sven Gothel | 2023-06-26 | 1 | -35/+97 |
| | | | | | | | | | | generated or existing) Class objects (existing at runtime) New nature can be queried via isNamedClass(). Cleaned up equals() and completed hashValue() etc. Ctor validation ensures exactly one nature is set! | ||||
* | GlueGen JavaCallback: Add preliminary implementation (WIP): Produces proper ↵ | Sven Gothel | 2023-06-25 | 3 | -9/+146 |
| | | | | | | interfaces, TODO implementation Note: JavaCallbackDef is commented out on test2.cfg example, since implementation is missing. | ||||
* | GlueGen JavaConfiguration: Add List<Integer> stringArguments(final ↵ | Sven Gothel | 2023-06-25 | 1 | -0/+18 |
| | | | | AliasedSymbol symbol) | ||||
* | GlueGen JavaConfiguration: Add 'JavaCallbackDef ↵ | Sven Gothel | 2023-06-25 | 1 | -1/+47 |
| | | | | | | | | | <funcion-pointer-typedef-name> [user-param-idx]' Define a JavaCallback, enacted on a function-pointer argument `T2_CallbackFunc` and a user-param `void*` for Java Object mapping Example: JavaCallbackDef T2_CallbackFunc 2 | ||||
* | GlueGen FunctionSymbol: Simplify ctor reusing main-ctor; Be always reachable ↵ | Sven Gothel | 2023-06-25 | 1 | -3/+2 |
| | | | | via type(def)name, ctor: addAliasedName( type.getCName() ) | ||||
* | GlueGen Add JavaType.forObjectClass() | Sven Gothel | 2023-06-25 | 1 | -0/+8 |
| | |||||
* | GlueGen FunctionType: Expose toString(..) w/ 'isPointer' argument | Sven Gothel | 2023-06-25 | 1 | -0/+3 |
| | |||||
* | GlueGen: Fix Type.getSignature(..): Test for isFunctionPointer() to ↵ | Sven Gothel | 2023-06-25 | 1 | -6/+9 |
| | | | | elaborate on FunctionType as getTargetType() only retruns a function-ptr and no more a function-type. | ||||
* | JavaEmitter.generateArrayGetterSetterCode(): Place elemCountExpr null check ↵ | Sven Gothel | 2023-06-25 | 1 | -8/+7 |
| | | | | where it could occur -> non-opaque, non-primitive array case | ||||
* | GlueGen: Add JavaEmitter(JavaConfiguration) ctor | Sven Gothel | 2023-06-25 | 1 | -0/+5 |
| | |||||
* | GlueGen Fix ProcAddressCMethodBindingEmitter.jniMangle(..) override: Use ↵ | Sven Gothel | 2023-06-25 | 1 | -1/+1 |
| | | | | renamed {jniMangle->getJNIMangledArg}(..) | ||||
* | GlueGen: Rename GlueEmitter.getConfig{uration->}() and drop ↵ | Sven Gothel | 2023-06-25 | 5 | -14/+7 |
| | | | | JavaEmitter.getConfig(), cleaning up API usage | ||||
* | GlueGen: Expose CMethodBindingEmitter.getJNIMangledArgs() as a public static ↵ | Sven Gothel | 2023-06-25 | 1 | -14/+24 |
| | | | | to be reusable | ||||
* | GlueGen Struct [16]: Add support for pointer-pointer and function-pointer values | Sven Gothel | 2023-06-23 | 6 | -184/+429 |
| | | | | See documentation and unit test test2.h, Test2FuncPtr.java and Test3PtrStorage.java | ||||
* | GlueGen: JavaConfiguration.promoteTypeInfo(): Fix primitive pointerDepth, ↵ | Sven Gothel | 2023-06-23 | 1 | -1/+1 |
| | | | | i.e. only pass numPointersStripped w/o adding info.pointerDepth() | ||||
* | GlueGen: JavaConfiguration.typeInfo(..): Clarify DEBUG_TYPE_INFO output | Sven Gothel | 2023-06-23 | 1 | -12/+14 |
| | |||||
* | GlueGen: Type: Have get{Base,Target}Type() stop at isFunctionPointer(), ↵ | Sven Gothel | 2023-06-23 | 7 | -38/+76 |
| | | | | | | | | | | enhance API doc; Add getArrayBaseOrPointerTargetType() and getTargetFunction() Added getArrayBaseOrPointerTargetType() returns getBaseType() for arrays or getTargetType() for pointer, i.e. stops traversing if an elementType is a pointer and returns the elementType as target-type. This resolves 'int* intPtrArray[10]', but also simplifies all cases of 'int** intPtrPtr' and 'int intPtr[10]' etc. Since get{Base,Target}Type() returns the functionPointer, getTargetFunction() allows to retrieve the actual target function type. | ||||
* | GlueGen: Type, JavaType: Align getSignature(..) output | Sven Gothel | 2023-06-23 | 2 | -41/+48 |
| | |||||
* | NIO NativeBuffer, {Element,Pointer}Buffer: Add limit, clear and flip; ↵ | Sven Gothel | 2023-06-23 | 4 | -94/+385 |
| | | | | | | | | Arrange wrap/deref arguments equal; Add equal set of absolute get/set methods Completing API to simplify usage by generated code. All absolute get/set method check arguments itself and against limit(), allow to drop checks in generated code (size). | ||||
* | GlueGen Test: Test2 -> Test2FuncPtr | Sven Gothel | 2023-06-23 | 1 | -3/+3 |
| | |||||
* | JavaEmitter.typeToJavaTypeImpl(): Add targetType in GlueGenException and ↵ | Sven Gothel | 2023-06-21 | 1 | -13/+15 |
| | | | | remove '"' in message | ||||
* | GlueGen junit test2.h: Add an anonymous struct pointer w/ opaque long config | Sven Gothel | 2023-06-20 | 2 | -5/+4 |
| | |||||
* | GlueGen Struct [15b]: FunctionPointer: Drop is<FuncName>Null() -> use ↵ | Sven Gothel | 2023-06-20 | 4 | -27/+21 |
| | | | | get<FuncName>() | ||||
* | GlueGen Struct [15]: Add FunctionPointer getter and setter support w/ ↵ | Sven Gothel | 2023-06-20 | 6 | -86/+319 |
| | | | | documentation | ||||
* | GlueGen Type: Use virt getTargetType() for ArrayType dropping ↵ | Sven Gothel | 2023-06-19 | 7 | -26/+30 |
| | | | | getElementType(); Rename getBase{Elem ->}Type() to align with getTargetType() | ||||
* | CPP Enable Pragma Once: Remove cli '--enablePragmaOnce' option as it is ↵ | Sven Gothel | 2023-06-18 | 1 | -4/+1 |
| | | | | enabled by default | ||||
* | Merge remote-tracking branch ↵ | Sven Gothel | 2023-06-18 | 2 | -6/+9 |
|\ | | | | | | | 'Mathieu_Fery/feature/add_preserveGeneratedCPP_option' | ||||
| * | feat(cli): Add --preserveGeneratedCPP option inside GlueGen | Mathieu Féry | 2023-06-16 | 2 | -4/+8 |
| | | |||||
* | | Merge remote-tracking branch ↵ | Sven Gothel | 2023-06-18 | 1 | -1/+9 |
|\ \ | | | | | | | | | | 'Mathieu_Fery/feature/improve_logs_inside_translation_unit' | ||||
| * | | feat(translationUnit): Improve logs in case of failure inside translationUnit | Mathieu Féry | 2023-06-16 | 1 | -1/+9 |
| |/ | |||||
* | | Merge remote-tracking branch 'Mathieu_Fery/feature/improve_compound_type_errors' | Sven Gothel | 2023-06-18 | 1 | -2/+6 |
|\ \ | |||||
| * | | feat(CompoundType): Improve error log on CompoundType.addField and ↵ | Mathieu Féry | 2023-06-16 | 1 | -2/+6 |
| |/ | | | | | | | CompoundType.setBodyParsed when body is already parsed | ||||
* | | fix(cli): Fix disablePragmaOnce option | Féry Mathieu (Mathius) | 2023-06-18 | 1 | -1/+1 |
| | | | | | | | | Option set enablePragmaOnce to true instead false | ||||
* | | CustomJNICode: Add missing (separated) test1p1-CustomJNICode.c.stub | Sven Gothel | 2023-06-18 | 1 | -0/+5 |
| | | |||||
* | | CustomJNICode: Fix/complete commit d7bc10d7ff0e3a30d74c4e4c439230f3983bcfb4: ↵ | Sven Gothel | 2023-06-18 | 5 | -17/+13 |
| | | | | | | | | Add emitCustomJNICode(..) for JavaEmitter.endFunctions() not just structs and fix the JNI-c stub code | ||||
* | | Merge remote-tracking branch 'Mathieu_Fery/feature/add_customJNICode_directive' | Sven Gothel | 2023-06-18 | 10 | -1/+108 |
|\ \ | |||||
| * | | feat(jni): Add directive for dedicated JNI Code with CustomJNICode | Mathieu Féry | 2023-06-16 | 10 | -1/+108 |
| |/ | |||||
* | | Merge remote-tracking branch 'Mathieu_Fery/feature/support_of_bitwise_not' | Sven Gothel | 2023-06-18 | 3 | -2/+19 |
|\ \ | |||||
| * | | feat(constants): Add supports of ~ inside ConstantDefinition | Mathieu Féry | 2023-06-16 | 3 | -2/+19 |
| |/ | |||||
* | | CPP Enable Pragma Once: Default is 'true', since usually all compiler and ↵ | Sven Gothel | 2023-06-18 | 2 | -3/+6 |
| | | | | | | | | APIs do support this feature | ||||
* | | CPP Enable Pragma Once: Add GlueGen.run(..) debug output w/ all paramter | Sven Gothel | 2023-06-18 | 2 | -3/+8 |
| | | |||||
* | | Merge remote-tracking branch 'remotes/Mathieu_Fery/feature/enable_pragma_once' | Sven Gothel | 2023-06-18 | 6 | -15/+79 |
|\ \ | |||||
| * | | feat(feature): Enable pragma once management | Mathieu Féry | 2023-06-16 | 6 | -15/+79 |
| |/ |