RFR: 8344942: Template-Based Testing Framework [v57]
Emanuel Peter
epeter at openjdk.org
Fri May 23 10:06:12 UTC 2025
On Fri, 23 May 2025 09:24:15 GMT, Manuel Hässig <mhaessig at openjdk.org> wrote:
>> test/hotspot/jtreg/testlibrary_tests/template_framework/examples/TestTutorial.java line 627:
>>
>>> 625: // the current scope.
>>> 626: var templateSample = Template.make("type", (DataName.Type type) -> body(
>>> 627: let("name", dataNames(MUTABLE).exactOf(type).sample().name()),
>>
>> Suggestion:
>>
>> let("name", dataNames(MUTABLE_OR_IMMUTABLE).exactOf(type).sample().name()),
>>
>> To get all available names you also need immutable names. There is no difference in this case, but this being a tutorial, the semantics should match the explanations.
>
> Then again, the mutability concept is introduced further down. I'm a bit torn...
I'd like to keep it simple at that point, yes. But I can leave a comment saying that we will look into that later.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24217#discussion_r2104258195
More information about the hotspot-compiler-dev
mailing list