aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1449: Convert manual/index.html to `gfm` (GitHub-Flavored Markdown) ↵Sven Gothel2023-08-147-2322/+4485
| | | | | | | | using markdown -> manual/index.md and add conversion recipes + make/scripts/md2html_update.sh Noyte: Additionally edited 'doc/misc/macos_nativelib_dependencies.md` to include `Use explicit OpenJDK/Temurin JDK `java` executable path` as a workaround to pass `DYLD_LIBRARY_PATH` to `/usr/bin/java`.
* feat(manual): Update configuration documentation.Féry Mathieu (Mathius)2023-08-131-2/+126
| | | | | | | | | | | | | | | | | Add following configuration : * CustomJNICode * ExtendedInterfaceSymbolsIgnore * ExtendedInterfaceSymbolsOnly * ExtendedImplementationSymbolsIgnore * ExtendedImplementationSymbolsOnly * ExtendedIntfAndImplSymbolsIgnore * ExtendedIntfAndImplSymbolsOnly * MaxOneElement * ParentClass * ReturnsStringOnly Update following configuration : * Extends
* Bump JCPP: Use Unix '/' file separator in #line output for UNIFIED_OUTPUTSven Gothel2023-08-123-3/+6
|
* GlueGen: 'from expression' -> 'with expression'Sven Gothel2023-08-101-1/+1
|
* Bug 1450: TestCParser: Enable test10_cc() w/o JCPPSven Gothel2023-08-101-1/+1
|
* Bug 1450: Add test snippets covering the issues: test2.h for Bindingtest2, ↵Sven Gothel2023-08-107-14/+371
| | | | TestJCPP and new TestCParser
* Bug 1450: Be more verbose w/ JavaEmitter comment lines for enums and ↵Sven Gothel2023-08-102-4/+9
| | | | defines, include native expression
* Bug 1450: Widen ConstantDefinition.isConstantExpression() to include ↵Sven Gothel2023-08-101-2/+4
| | | | | | 'patternCPPOperand' i.e. all supported operands used for constant-expression of define macros.
* Bug 1450: Fix 'Number' rule, i.e. only consume positive numbers as ↵Sven Gothel2023-08-101-2/+2
| | | | | | | | | | | | | | | `additiveExpr` and `unaryExpr` consume the '-' operator n GlueGen commit 10032c0115f2794a254cffc2a1cd5e48ca8ff0b8 in branch JOGL_2_SANDBOX Ken hacked in consuming a '-' prefix to have negative numbers covered by 'Number'. This is wrong, as it breaks deduction of `additiveExpr` and 'unaryExpr' rules, which want to consume '-' and '+'. The latter is used to completely resolve constant expressions starting from the 'constExpr' rule. See ISO 9899:202x Programming Language - C https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2596.pdf
* ANTLR Syntax: Add debugging facility for GnuCParser.g and StdCParser.gSven Gothel2023-08-102-9/+29
|
* TestJCPP: Add recursive-include test and include a header file starting with ↵Sven Gothel2023-08-084-9/+53
| | | | '-' and in a subdir containing a '-'
* Merge remote-tracking branch 'Mathieu_Fery/1447-java-wildcard-parsing'Sven Gothel2023-08-081-1/+7
|\
| * feat(generation): Fix generic parsing inside JavaParser.g to allow parsing ↵Mathieu Féry2023-08-081-1/+7
| | | | | | | | of java callback implementation
* | Merge remote-tracking branch ↵Sven Gothel2023-08-081-0/+1
|\ \ | | | | | | | | | 'Mathieu_Fery/1446-parent-class-directives-issue-with-if-and-impl'
| * | feat(generation): Fix CodeGenUtils.emitJavaHeadersMathieu Féry2023-08-081-0/+1
| |/ | | | | | | When both classExtended and interfaces are specified for given class space missing between classExtended and implements keyword
* | Drop PCPP, GlueGen exclusively uses JCPP; Adopt test case Test{P->J}CPPSven Gothel2023-08-088-1492/+45
| |
* | Bump jcpp (merged w/ jcpp upstream v1.4.14) and adopt to changesSven Gothel2023-08-085-18/+54
|/
* JavaCallback: Add Mathieu Féry's detailed git comment regarding ↵Sven Gothel2023-08-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | 2abb40b0ca9a6a06bdbe3e66b4235301ed15c693; Updated GlueGen_Mapping.md Original comment of commit 2abb40b0ca9a6a06bdbe3e66b4235301ed15c693 wip(test_case): Example of test case for issue related of 927bbc7160a812bb29c0e7120d4a3009bfb13bbf Revised comment taken from unmerged updated branch f6de3646acf0fdadf55708fd8a1c42fbd8663bc5 wip(test_case): Example of test case for issue related of 927bbc7160a812bb29c0e7120d4a3009bfb13bbf Some short summary of modifications : * Add tests with each emitters for test2, but tests are shared and run for each emitters * Update JavaParser.g to allow parsing of bindings generated after test2 processing * Add basic management of generic type (But not yet retrieved inside classTypeSpec args) * Add basic management of annotations (with or w/o parameter(s)) (Retrieved in statement, classes and interfaces but not used) * Align lexer constants in JavaParser.g * Update JavaParser.g to allow fetching all inner classes and inner interfaces to allow excluding by ExtendedInterfaceSymbolsIgnore * Modify JavaConfiguration::requiresJavaCallbackCode because all callback need to force generation not only callback without user param * Functions not generated w/o JavaConfiguration::requiresJavaCallbackCode : * SetLogCallBack12a * SetLogCallBack12b * MessageCallback11b * alBufferCallback0
* Minor cleanup (includes, spacing)Sven Gothel2023-08-055-12/+1
|
* Add notes `Loading a MacOS Native Library's Dependencies` and use absolute ↵Sven Gothel2023-08-052-6/+44
| | | | path in unit test script for library-path
* Cleanup unit test class names (pt3): Try to start w/ 'Test', remove ↵Sven Gothel2023-08-052-10/+10
| | | | intermediate 'Test' for supporting, non-test classes
* Cleanup unit test class names (pt2): Try to start w/ 'Test', remove ↵Sven Gothel2023-08-0518-25/+25
| | | | intermediate 'Test' for supporting, non-test classes
* Cleanup unit test class names: Try to start w/ 'Test', remove intermediate ↵Sven Gothel2023-08-0510-0/+0
| | | | 'Test' for supporting, non-test classes
* JavaConfiguration.requiresJavaCallbackCode() shall return true for all ↵Sven Gothel2023-08-051-1/+1
| | | | | | JavaCallback cases no just non-userParam case Additional body code for JavaCallback is required for methods it.
* GlueGen Code Unit Tests using a statically linked tool library do not need ↵Sven Gothel2023-08-054-21/+4
| | | | | | to load the tool library dynamically, hence dropped. Just ensure GlueGen itself is initializes via Platform.initSingleton() in common BaseClass
* WIP JavaCallback Tests: Fix Test4p2JavaCallback.chapter__TestLoadLibrary() ↵Sven Gothel2023-08-051-1/+1
| | | | issue loadBindingtest2p2() not loadBindingtest2p1()
* WIP JavaCallback Tests: Fix typo in 'CustomJavaCode' Java class target nameSven Gothel2023-08-051-1/+1
|
* WIP JavaCallback Tests: Fix: test2-CustomJavaImplCode.java.stub must be ↵Sven Gothel2023-08-051-2/+3
| | | | 'IncludeAs' for both implementations, Bindingtest2p1Impl and Bindingtest2p2Impl
* WIP JavaCallback Tests: Fix: Link library Bindingtest2p1 against library ↵Sven Gothel2023-08-051-3/+3
| | | | test2 not test1
* WIP JavaCallback Tests: Rename test2-gluegen.cfg -> test2-if.cfgSven Gothel2023-08-052-1/+1
|
* Merge remote-tracking branch 'Mathieu_Fery/wip/test_case_callback_emission'Sven Gothel2023-08-0422-313/+902
|\
| * wip(test_case): Example of test case for issue related of ↵Mathieu Féry2023-08-0422-313/+902
| | | | | | | | | | | | 927bbc7160a812bb29c0e7120d4a3009bfb13bbf Almost done
* | Merge remote-tracking branch ↵Sven Gothel2023-08-045-7/+19
|\ \ | | | | | | | | | 'Mathieu_Fery/feature/prevent_callback_generation_if_setter_is_absent'
| * | feat(callbackGenerator): Prevent generation of CallBack interface if setter ↵Mathieu Féry2023-08-045-7/+19
| | | | | | | | | | | | related isn't present
* | | Merge remote-tracking branch ↵Sven Gothel2023-08-041-4/+15
|\ \ \ | | | | | | | | | | | | 'Mathieu_Fery/feat/array_accessor_with_getter_of_field_in_pascal_case'
| * | | feat(arrayAccessor): Allow to use ReturnedArrayLength with getter associated ↵Mathieu Féry2023-08-031-4/+15
| |/ / | | | | | | | | | with field with name in PascalCase or camelCase
* | / Revert "JavaCallback: Remove non-UserParam ↵Sven Gothel2023-08-042-2/+12
| |/ |/| | | | | | | | | JavaConfiguration.requiresJavaCallbackCode()" This reverts commit 927bbc7160a812bb29c0e7120d4a3009bfb13bbf.
* | doc/GlueGen_Mapping.md: Shorten UserParamIndex '<0' to disable 'UserParam' ↵Sven Gothel2023-08-042-4/+65
| | | | | | | | and produce html page
* | JavaCallback: Remove non-UserParam JavaConfiguration.requiresJavaCallbackCode()Sven Gothel2023-08-042-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Method was encapsulated in commit d4e8ecc3b4f68b86d95ec951971a0fea20217988 and questioned whether it is required. The non-userParam callback case adds no additional code requirements. Both, callback with and without userParam shares same code path and the respective native static fields. Only that the non-userParam code path adds additional native static fields, but all code sections are produced in both cases. Passed all unit tests.
* | JavaCallbackEmitter.emitJavaKeyClass(): Use directBufferAddress for compound ↵pulledSven Gothel2023-08-045-16/+259
| | | | | | | | | | | | | | | | | | types in equals and hashCode, i.e. use memory identity Use case is having a compound-type as userParam, which also acts as key, see MessageCallback13, Test4JavaCallback.chapter13(). The Java compound instance is re-created using the actual identical native memory (address), which has been stored or passed in the native toolkit.
* | JavaEmitter.bindFunction(): Add JavaCallback userParam non-void case (i.e. ↵Sven Gothel2023-08-041-18/+28
| | | | | | | | | | | | | | | | | | 'String') Use case: String type as userParam, barely tested and not useful. However, let's pass through all cases in our code. Added LOG INFO for mapped types.
* | CMethodBindingEmitter.emitBodyPassCArguments(): Either pass ↵Sven Gothel2023-08-041-2/+4
| | | | | | | | | | | | | | | | STRING_CHARS_PREFIX or javaCallbackEmitter.emitCOptArgumentSuffix(..) We only produce one variant in code. Use case: String type as userParam (barely tested and not useful)
* | Fix & Enhance Test4JavaCallback for non-userParam chapter12*: Fix ad-hoc ↵Sven Gothel2023-08-044-38/+142
| | | | | | | | | | | | | | | | compound equals and add chapter12b for additional parameter with different order - ad-hoc compound equals must compare value, since native code creates a new class instance from native struct - Add additional case with addition callback argument for further validation
* | JavaEmitter: Encapsulate 'needsJavaCallbackCode' query in JavaConfiguration. ↵Sven Gothel2023-08-042-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | TBD: Is this even required? - needsIntermediateOperation -> needsJavaCallbackCode - Use JavaConfiguration.requiresJavaCallbackCode(..) TBD: Is this even required? As far as I see, the non-userParam callback case adds no additional code requirements. Both, callback with and without userParam shares same code path and the respective native static fields. Only that the non-userParam code path adds additional native static fields, but all code sections are produced in both cases.
* | JavaCallbackEmitter.emitCAdditionalCode(): Use `info.cbFuncBinding` locally ↵Sven Gothel2023-08-041-6/+11
| | | | | | | | | | | | | | | | and passed 'jcbFuncCMethodEmitter' only to invoke CMethodBindingEmitter.emitBodyMapCToJNIType(..) Passed 'jcbFuncCMethodEmitter' only used to access CMethodBindingEmitter.emitBodyMapCToJNIType(int, boolean), a non-ideal hack! (FIXME) General processing shall use the local `info.cbFuncBinding`.
* | JavaCallbackEmitter.emitJavaCallbackBodyPassJavaArguments(): Drop redundant ↵Sven Gothel2023-08-041-5/+5
| | | | | | | | | | | | | | | | | | arg 'MethodBinding jcbFuncCMethodBinding', use local 'info.cbFuncBinding' Since emitJavaCallbackBodyPassJavaArguments() is private now, only use case is to handle info.cbFuncBinding and we can drop the redundant argument. Similar to cleanup commit e9a2294b3f18bb4c4f38347ccf347058cb4642b3
* | JavaCallbackEmitter.emitCSetFuncPreCall(): Drop redundant arg ↵Sven Gothel2023-08-032-5/+5
| | | | | | | | | | | | | | 'CMethodBindingEmitter jcbFuncCMethodEmitter', use local 'info.cbFuncBinding' Was added in commit ad69716fda64b517c33ed847c4b215ea398aac99 'callback without userData', while adding ad-hoc compound conversion.
* | JavaCallbackEmitter.{emitCSetFuncPreCall, emitCAdditionalCode, ↵Sven Gothel2023-08-032-37/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | emitJavaCallbackBodyPassJavaArguments}(): Fix exclusion of ad-hoc compound conversion for userParam Passed CMethodBindingEmitter denotes the callback-function, including the binding. The new iteration to handle the ad-hoc compound conversion, introduced in commit ad69716fda64b517c33ed847c4b215ea398aac99 'callback without userData', iterates over the callback-function argument list. Hence it shall only exclude the ad-hoc compound conversion if index != info.cbFuncUserParamIdx. Dropping the addition exclusion 'i != info.setFuncUserParamIdx'.
* | JavaCallbackEmitter.{emitCSetFuncPreCall, emitCAdditionalCode, ↵Sven Gothel2023-08-031-4/+5
| | | | | | | | emitJavaCallbackBodyPassJavaArguments}(): Use capitalized sub-string 'baseArgName' for (static) callback related entities
* | JavaCallbackEmitter.{emitCSetFuncPreCall, emitCAdditionalCode}(): Group ↵Sven Gothel2023-08-031-6/+17
| | | | | | | | 'userParamDefined' case (cleanup)