RFR: 8367531: Template Framework: use scopes and tokens instead of misbehaving immediate-return-queries [v24]

Emanuel Peter epeter at openjdk.org
Tue Nov 11 13:52:20 UTC 2025


On Fri, 7 Nov 2025 12:00:35 GMT, Christian Hagedorn <chagedorn at openjdk.org> wrote:

>> Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix whitespace
>
> test/hotspot/jtreg/compiler/lib/template_framework/TemplateFrame.java line 62:
> 
>> 60:  * on how much time is spent on the code from the template corresponding to the frame,
>> 61:  * and to give a termination criterion to avoid nesting templates too deeply.
>> 62:  *
> 
> It now more sounds like a "TemplateScope" since we have a "TemplateFrame" per scope and not per template which the latter name somehow suggests. But just wanted to share that thought here.

I suppose we could change `TemplateFrame` -> `TemplateScope`, and also `CodeFrame` -> `CodeScope`. But I think it is also ok to keep the "frame" name, which models the "scope" concepts. Sometimes, there are also multiple frames for a scope, for example when we do anchor and insert. So it's not quite a 1:1, but they are closely related. And if a scope is transparent, we sometimes don't even insert a frame. That's why I'm a bit hesitant to do the renaming.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27255#discussion_r2514305038


More information about the hotspot-compiler-dev mailing list