[code-reflection] RFR: OpWriter block naming align with block indexes [v2]

Adam Sotona asotona at openjdk.org
Mon May 27 15:33:41 UTC 2024


On Mon, 27 May 2024 15:21:40 GMT, Paul Sandoz <psandoz at openjdk.org> wrote:

>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   applied suggested changes
>
> src/java.base/share/classes/java/lang/reflect/code/writer/OpWriter.java line 64:
> 
>> 62:         public String apply(CodeItem codeItem) {
>> 63:             return switch (codeItem) {
>> 64:                 case Block block -> gn.computeIfAbsent(block, _b -> name(block));
> 
> Suggestion:
> 
>                 case Block block -> gn.computeIfAbsent(block, _b -> name(_b));
> 
> Or replace with method reference to static method?

unfortunately `_b` is not a `Block` but `CodeItem`

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

PR Review Comment: https://git.openjdk.org/babylon/pull/91#discussion_r1616191445


More information about the babylon-dev mailing list