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

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Thu May 22 11:20:07 UTC 2025


On Thu, 22 May 2025 11:03:48 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> test/hotspot/jtreg/compiler/lib/template_framework/DataName.java line 42:
>> 
>>> 40:  *               {@link DataName} when sampling later on.
>>> 41:  */
>>> 42: public record DataName(String name, DataName.Type type, boolean mutable, int weight) implements Name {
>> 
>> Since `DataName` represents "fields and variables", you might consider renaming it to `VariableName` or `VarName` for clarity - fields can be considered variables too (as in [instance variables](https://en.wikipedia.org/wiki/Instance_variable)). This is just a minor, optional suggestion, in case you still have some fuel left for this PR ;)
>
> Here some arguments for `DataName`  vs `VariableName` :
> - If you hear `VariableName` , you may misunderstand that it means variables only. But what about method arguments and fields?
> - We also want to cover constants, i.e. final fields and variables. Someone may say that constants should not be called variables.
> - `DataName`  is abstract enough, and the user may be slightly irritated because they don't exactly understand right away what it means. That way, they would end up consulting the API description, rather than making their own (possibly false) assumptions.
> 
> @chhagedorn has no strong preference, but slightly leans toward `DataName`.
> @mhaessig came up with `DataName`, and is for it still.
> I feel the same as @chhagedorn , with a slight preference to `DataName`. And of course it would cost me a few hours to implement the change, making sure all the code comments are still correct ;)

Fair enough, thanks for considering the suggestion!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2102304496


More information about the hotspot-compiler-dev mailing list