RFR: 8358772: Template-Framework Library: Primitive Types [v5]

Christian Hagedorn chagedorn at openjdk.org
Fri Jun 13 06:46:32 UTC 2025


On Thu, 12 Jun 2025 14:29:13 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> I would like to add primitive type support to the template framework library.
>> 
>> In follow-up work, we will use these types in random expression generation - but they can also already be useful on their own now.
>> 
>> I encountered an issue with some methods that return `Token` from the `TemplateFramework`, such as `Hook.insert` and `addDataName`. Since `Token` was package private, this class could not be used in some places where automatic type inference is required. I now refactored the code, so that the `Token` is just an empty interface, and all the methods are moved to a separate class `TokenParser`.
>> 
>> Original experiments from here: https://github.com/openjdk/jdk/pull/23418
>
> Emanuel Peter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 16 commits:
> 
>  - Merge branch 'master' into JDK-8358772-TemplateFramework-types-operations-expressions
>  - rm static final
>  - review suggestions applied
>  - Apply suggestions from code review
>    
>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>    Co-authored-by: Manuel Hässig <manuel at haessig.org>
>  - Apply suggestions from code review
>    
>    Co-authored-by: Christian Hagedorn <christian.hagedorn at oracle.com>
>    Co-authored-by: Manuel Hässig <manuel at haessig.org>
>  - parser refactor
>  - rm previous changes
>  - rm unnecessary file
>  - documentation
>  - improve test
>  - ... and 6 more: https://git.openjdk.org/jdk/compare/dd688290...b07f752b

Marked as reviewed by chagedorn (Reviewer).

-------------

PR Review: https://git.openjdk.org/jdk/pull/25672#pullrequestreview-2923586113


More information about the hotspot-compiler-dev mailing list