On Tue, 10 Nov 2026 15:21:24 GMT, Jorn Vernee <[email protected]> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/SharedUtils.java line
>> 394:
>>
>>> 392:
>>> 393: public static boolean isSigned(MemoryLayout layout) {
>>> 394: return !(layout instanceof OfIntegral integral) ||
>>> integral.isSigned();
>>
>> May be a bit confusing that non-integral MemoryLayouts are signed, but ok.
>
> I agree. I've just removed this method in favor of casting directly to
> `OfIntegeral` at the use site (making it clear there's an assumption being
> made about the layout type).
Okay, nvm, that doesn't quite work since we also see OfBoolean and OfFloat and
OfDouble layouts on the code path where this is used. We can change the
polarity though, and return `false` for those. That makes it a little clearer.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/33417#discussion_r4527131894