[code-reflection] RFR: Lower StringTemplateOp [v4]

Mourad Abbay mabbay at openjdk.org
Mon Mar 18 10:35:50 UTC 2024


On Thu, 14 Mar 2024 16:29:16 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Mourad Abbay has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Lower each expression in a separate block
>
> src/java.base/share/classes/java/lang/reflect/code/op/ExtendedOps.java line 2809:
> 
>> 2807:                     if (op instanceof YieldOp yop) {
>> 2808:                         expressions.add(block.context().getValue(yop.yieldValue()));
>> 2809:                         builders[0] = block;
> 
> Making a note for future change. This code suggests that `transformBody` could return the last block builder, so you don't have to keep track of it yourself. Another solution is to create blocks for the start of each expression and replace the yield with a branch to the next expression.

I implemented the other solution.

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

PR Review Comment: https://git.openjdk.org/babylon/pull/39#discussion_r1528288360


More information about the babylon-dev mailing list