aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* GlueGen JavaCallback: Add preliminary implementation (WIP): Produces proper ↵Sven Gothel2023-06-253-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 Gothel2023-06-251-0/+18
| | | | AliasedSymbol symbol)
* GlueGen JavaConfiguration: Add 'JavaCallbackDef ↵Sven Gothel2023-06-251-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 Gothel2023-06-251-3/+2
| | | | via type(def)name, ctor: addAliasedName( type.getCName() )
* GlueGen Add JavaType.forObjectClass()Sven Gothel2023-06-251-0/+8
|
* GlueGen FunctionType: Expose toString(..) w/ 'isPointer' argumentSven Gothel2023-06-251-0/+3
|
* GlueGen: Fix Type.getSignature(..): Test for isFunctionPointer() to ↵Sven Gothel2023-06-251-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 Gothel2023-06-251-8/+7
| | | | where it could occur -> non-opaque, non-primitive array case
* GlueGen: Add JavaEmitter(JavaConfiguration) ctorSven Gothel2023-06-251-0/+5
|
* GlueGen Fix ProcAddressCMethodBindingEmitter.jniMangle(..) override: Use ↵Sven Gothel2023-06-251-1/+1
| | | | renamed {jniMangle->getJNIMangledArg}(..)
* GlueGen: Rename GlueEmitter.getConfig{uration->}() and drop ↵Sven Gothel2023-06-255-14/+7
| | | | JavaEmitter.getConfig(), cleaning up API usage
* GlueGen: Expose CMethodBindingEmitter.getJNIMangledArgs() as a public static ↵Sven Gothel2023-06-251-14/+24
| | | | to be reusable
* GlueGen Struct [16]: Add support for pointer-pointer and function-pointer valuesSven Gothel2023-06-236-184/+429
| | | | See documentation and unit test test2.h, Test2FuncPtr.java and Test3PtrStorage.java
* GlueGen: JavaConfiguration.promoteTypeInfo(): Fix primitive pointerDepth, ↵Sven Gothel2023-06-231-1/+1
| | | | i.e. only pass numPointersStripped w/o adding info.pointerDepth()
* GlueGen: JavaConfiguration.typeInfo(..): Clarify DEBUG_TYPE_INFO outputSven Gothel2023-06-231-12/+14
|
* GlueGen: Type: Have get{Base,Target}Type() stop at isFunctionPointer(), ↵Sven Gothel2023-06-237-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(..) outputSven Gothel2023-06-232-41/+48
|
* NIO NativeBuffer, {Element,Pointer}Buffer: Add limit, clear and flip; ↵Sven Gothel2023-06-234-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 -> Test2FuncPtrSven Gothel2023-06-231-3/+3
|
* JavaEmitter.typeToJavaTypeImpl(): Add targetType in GlueGenException and ↵Sven Gothel2023-06-211-13/+15
| | | | remove '"' in message
* GlueGen junit test2.h: Add an anonymous struct pointer w/ opaque long configSven Gothel2023-06-202-5/+4
|
* GlueGen Struct [15b]: FunctionPointer: Drop is<FuncName>Null() -> use ↵Sven Gothel2023-06-204-27/+21
| | | | get<FuncName>()
* GlueGen Struct [15]: Add FunctionPointer getter and setter support w/ ↵Sven Gothel2023-06-206-86/+319
| | | | documentation
* GlueGen Type: Use virt getTargetType() for ArrayType dropping ↵Sven Gothel2023-06-197-26/+30
| | | | getElementType(); Rename getBase{Elem ->}Type() to align with getTargetType()
* CPP Enable Pragma Once: Remove cli '--enablePragmaOnce' option as it is ↵Sven Gothel2023-06-181-4/+1
| | | | enabled by default
* Merge remote-tracking branch ↵Sven Gothel2023-06-182-6/+9
|\ | | | | | | 'Mathieu_Fery/feature/add_preserveGeneratedCPP_option'
| * feat(cli): Add --preserveGeneratedCPP option inside GlueGenMathieu Féry2023-06-162-4/+8
| |
* | Merge remote-tracking branch ↵Sven Gothel2023-06-181-1/+9
|\ \ | | | | | | | | | 'Mathieu_Fery/feature/improve_logs_inside_translation_unit'
| * | feat(translationUnit): Improve logs in case of failure inside translationUnitMathieu Féry2023-06-161-1/+9
| |/
* | Merge remote-tracking branch 'Mathieu_Fery/feature/improve_compound_type_errors'Sven Gothel2023-06-181-2/+6
|\ \
| * | feat(CompoundType): Improve error log on CompoundType.addField and ↵Mathieu Féry2023-06-161-2/+6
| |/ | | | | | | CompoundType.setBodyParsed when body is already parsed
* | fix(cli): Fix disablePragmaOnce optionFéry Mathieu (Mathius)2023-06-181-1/+1
| | | | | | | | Option set enablePragmaOnce to true instead false
* | CustomJNICode: Add missing (separated) test1p1-CustomJNICode.c.stubSven Gothel2023-06-181-0/+5
| |
* | CustomJNICode: Fix/complete commit d7bc10d7ff0e3a30d74c4e4c439230f3983bcfb4: ↵Sven Gothel2023-06-185-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 Gothel2023-06-1810-1/+108
|\ \
| * | feat(jni): Add directive for dedicated JNI Code with CustomJNICodeMathieu Féry2023-06-1610-1/+108
| |/
* | Merge remote-tracking branch 'Mathieu_Fery/feature/support_of_bitwise_not'Sven Gothel2023-06-183-2/+19
|\ \
| * | feat(constants): Add supports of ~ inside ConstantDefinitionMathieu Féry2023-06-163-2/+19
| |/
* | CPP Enable Pragma Once: Default is 'true', since usually all compiler and ↵Sven Gothel2023-06-182-3/+6
| | | | | | | | APIs do support this feature
* | CPP Enable Pragma Once: Add GlueGen.run(..) debug output w/ all paramterSven Gothel2023-06-182-3/+8
| |
* | Merge remote-tracking branch 'remotes/Mathieu_Fery/feature/enable_pragma_once'Sven Gothel2023-06-186-15/+79
|\ \
| * | feat(feature): Enable pragma once managementMathieu Féry2023-06-166-15/+79
| |/
* | GlueGen Struct [9b]: Add unit test for fixed 'void*' regression commit ↵Sven Gothel2023-06-182-3/+9
| | | | | | | | | | | | | | | | | | eec3f21c3597ff9bf9760a06e00dd341214ea90d See impact to T2_InitializeOptions struct fields: - 'void* Reserved1' shall be ignored (*this is the regression fix*) - 'void* Reserved2' will be taked due to config 'Opaque long T2_InitializeOptions.Reserved2' - 'T2_CustomFunc CustomFunc2' will produce a member function call as previously
* | GlueGen Struct [12]: Throw InternalError(..) for produced code-path where ↵Sven Gothel2023-06-181-0/+15
| | | | | | | | Ownership.Native _and_ native memory potentially gets replaced
* | GlueGen Struct [11]: Formalize Ownership (enum) and elaborate generated Java ↵Sven Gothel2023-06-181-120/+208
| | | | | | | | API-Doc
* | GlueGen Struct [10]: Don't skip primitive w/ platform dependent sized type ↵Sven Gothel2023-06-181-14/+7
| | | | | | | | | | | | | | | | | | | | in struct (like 'int') .. We already support platform dependent sizes like pointer etc, no reason to drop e.g. 'int'. Note: 'int' is also always 32bit of size within our current set of supported platforms, e.g. MachineDataInfo. Further fix and clarify primCElemFixedSize and primElemSizeExpr, only to be true and set if isPrimitive.
* | GlueGen Struct [9]: Fix regression which added a pointer referencing type ↵Sven Gothel2023-06-181-0/+8
| | | | | | | | 'void', i.e. exclude if !baseCElemType.hasSize() // like 'void*' -> 'void'
* | Type: Add hasSize(), change getSignature(..) for const: isConstTypedef() -> ↵Sven Gothel2023-06-181-2/+5
| | | | | | | | "typedef", isConstRaw() -> "native"
* | JavaType: Add getSignature(..) like TypeSven Gothel2023-06-181-5/+14
| |
* | GlueGen Struct [8]: Revised setter (resolved shrinking array, using 'subset' ↵Sven Gothel2023-06-173-115/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flag), added (detailed) JavaDoc in generated code Revised setter: A) int32_t val[10] -> setter for a subset change only, as-is with args[src, srcPos, destPos, length] - no new memory, reuse only - no special action to be performed B) int32_t* val -> setter with toggle 'subset' with args[subset, src, srcPos, destPos, length], - replace memory w/ 'subset==false' where it also may copy 'destPos' gap from old -> new - reuse memory w/ 'subset==true', where destPos+length <= elementCount C) const int32_t* val -> setter to replace referenced memory only args[src, srcPos, length] - always replaces memory, no copy of a gap (no destPos) Hence: - case (A) stays as is - case (B) will be revised and argument 'boolean subset' added - case (C) will be revised (simplified) and argument 'destPos' removed