On Tue, 7 Jul 2026 15:41:45 GMT, Jorn Vernee <[email protected]> wrote:
>> src/java.base/share/classes/java/lang/invoke/X-VarHandleSegmentView.java.template
>> line 76:
>>
>>> 74: return SCOPED_MEMORY_ACCESS.get$RawType$(bb.sessionImpl(),
>>> 75: bb.unsafeGetBase(),
>>> 76: offset(bb, base, offset)){#if[boolean]? != 0};
>>
>> It is not exactly clear that `byte` and `boolean` are defined at the same
>> time.
>>
>> Could we / should we instead do:
>>
>>
>> #if[floatingPoint]
>> ...
>> #else[floatingPoint]
>> #if[byte]
>> ...
>> #else[byte]
>> #if[boolean]
>> ...
>> #else[boolean]
>> ...
>> #end[boolean]
>> #end[byte]
>> #end[floatingPoint]
>>
>>
>> ...or is it too ugly?
>
> Better, I think
Actually, that would balloon up a bit too much if I also revert the other
`#if[!byte]` related things. I think I prefer adding a new key named
`ByteOrBoolean` and switching on that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31727#discussion_r3537846601