[code-reflection] RFR: OpWriter block naming align with block indexes [v2]
Paul Sandoz
psandoz at openjdk.org
Mon May 27 15:49:16 UTC 2024
On Mon, 27 May 2024 15:30:02 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> 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`
Ah, doh!
-------------
PR Review Comment: https://git.openjdk.org/babylon/pull/91#discussion_r1616210715
More information about the babylon-dev
mailing list