RFR: 8344942: Template-Based Testing Framework [v57]
Emanuel Peter
epeter at openjdk.org
Fri May 23 09:49:49 UTC 2025
On Fri, 23 May 2025 09:06:20 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Apply suggestions from code review
>>
>> Co-authored-by: Roberto Castañeda Lozano <robcasloz at users.noreply.github.com>
>
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 696:
>
>> 694: * rendering a template with {@code render(fuel)} (e.g. {@link ZeroArgs#render(float)}).
>> 695: */
>> 696: float DEFAULT_FUEL = 100.0f;
>
> Suggestion:
>
> static final float DEFAULT_FUEL = 100.0f;
>
> Is not mutated as far as i can tell.
applied!
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 703:
>
>> 701: * with {@link #setFuelCost(float)} inside {@link #body(Object...)}.
>> 702: */
>> 703: float DEFAULT_FUEL_COST = 10.0f;
>
> Suggestion:
>
> static final float DEFAULT_FUEL_COST = 10.0f;
applied!
> test/hotspot/jtreg/compiler/lib/template_framework/Template.java line 770:
>
>> 768: }
>> 769: boolean mutable = mutability == DataName.Mutability.MUTABLE;
>> 770: return new AddNameToken(new DataName(name, type, mutable, weight));
>
> "Input vaildation" for mutablity happens here for mutability, but inside the constructor for weight. Should both happen in the same place?
`mutability` only applies to `DataName`. `weight` applies also to `StructuralName`, so I put it in the shared code. I'd rather avoid duplicating that code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104232423
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104232536
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104224150
More information about the hotspot-compiler-dev
mailing list