RFR: 8344942: Template-Based Testing Framework [v61]

Emanuel Peter epeter at openjdk.org
Sun Jun 1 16:03:10 UTC 2025


On Fri, 30 May 2025 08:57:44 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Merge branch 'JDK-8344942-TemplateFramework-v3' of https://github.com/eme64/jdk into JDK-8344942-TemplateFramework-v3
>>  - move verification
>
> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 454:
> 
>> 452:             // For every recursion depth, some fuel is automatically subtracted
>> 453:             // so that the fuel slowly depletes with the depth.
>> 454:             // We keep the recursion going until the fuel is depleted.
> 
> You can also note here that if we forget to check the `fuel()`, the renderer causes a stack overflow because the recursion never ends.

Good idea! Added.

> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 487:
> 
>> 485:     // in this scope, and in any nested scope, including nested Templates. This allows us to
>> 486:     // add some fields and registers in one Template, and later on, in another Template, we
>> 487:     // can access these fields and registers again with "dataNames()".
> 
> What do you mean by "registers"?

Hmm good question. I think I meant "variables". Changed it!

> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 596:
> 
>> 594:         @Override
>> 595:         public boolean isSubtypeOf(DataName.Type other) {
>> 596:             return other instanceof MyPrimitive(String n) && n == name();
> 
> Is `==` intended? Should it be `equals()`?

Nice catch, fixed. Well it did not matter here, but it is good practice I guess.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2119278069
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2119276977
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2119278275


More information about the hotspot-compiler-dev mailing list