RFR: 8367531: Template Framework: use scopes and tokens instead of misbehaving immediate-return-queries [v29]
Roberto Castañeda Lozano
rcastanedalo at openjdk.org
Fri Nov 14 14:21:37 UTC 2025
On Fri, 14 Nov 2025 08:43:14 GMT, Emanuel Peter <epeter at openjdk.org> wrote:
> It is only "hardcoded" to never let hashtags and setFuelCost escape, it just implicitly downgrades a scope on those two "dimensions".
Is this a design choice or a constraint of the current implementation? I could imagine situations in which it could be useful to let a hashtag escape across Template boundaries, no? Something like:
var innerTemplate = Template.make(() -> transparentScope(let("foo", "42")));
var outerTemplate = Template.make(() -> scope(
innerTemplate.asToken(),
"// value of foo: #foo"
));
outerTemplate.render();
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27255#issuecomment-3533008770
More information about the hotspot-compiler-dev
mailing list