RFR: 8367531: Template Framework: use scopes and tokens instead of misbehaving immediate-return-queries [v26]
Emanuel Peter
epeter at openjdk.org
Wed Nov 12 15:22:32 UTC 2025
On Wed, 12 Nov 2025 12:46:18 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:
>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add missing comma from suggestion application
>
> test/hotspot/jtreg/compiler/lib/template_framework/TemplateFrame.java line 55:
>
>> 53: * of the current {@link Template}. Inner scopes of a {@link Template} have access to
>> 54: * the outer scope hashtag replacements, and any hashtag replacement defined inside an
>> 55: * inner scope is local and disappears once we leave the scope.
>
> We could explicitly mention here that we do not mean inner scopes that are templates themselves?
> Suggestion:
>
> * of the current {@link Template}. Inner scopes of a {@link Template}, that are not
> * templates themselves, have access to the outer scope hashtag replacements, and any
> * hashtag replacement defined inside an inner scope is local and disappears once we
> * leave the scope.
I'm not sure this is better:
`Inner scopes of a {@link Template}, that are not templates themselves,`
Because they are only scopes of this template if they are not scopes of another template 😆
I now wrote this, and hope it is a bit more helpful:
52 * hashtag replacements of the outer {@link TemplateFrame}s, up to the outermost
~ 53 * of the current {@link Template}. If a hashtag replacemnt is added in a scope,
~ 54 * we have to find traverse to outer scopes until we find one that is not transparent
~ 55 * for hashtags (at most it is the frame of the Template), and insert it there.
+ 56 * The hashtag replacent is local to that frame, and accessible for any frames nested
+ 57 * inside it, but not inside other Templates. The hashtag replacement disappears once
+ 58 * the corresponding scope is exited, i.e. the frame removed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27255#discussion_r2518731271
More information about the hotspot-compiler-dev
mailing list