On Wed, 28 Oct 2026 15:40:18 GMT, Maurizio Cimadamore <[email protected]> 
wrote:

>> Jorn Vernee has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Shave down javadoc
>
> src/java.base/share/classes/java/lang/foreign/ValueLayout.java line 128:
> 
>> 126:      * An integral value layout models an integral data type.
>> 127:      * <p>
>> 128:      * Values represented by {@linkplain OfIntegral integral} layouts
> 
> I think this should be less ABI centric and more definition-oriented. First 
> line is ok -- this is for modelling integral data types. Fine.
> 
> Then, we should say that an integral value has signedness -- that is it can 
> model both signed, or unsigned values. Then we should say that signedness 
> doesn't affect memory access operation, but it's useful when converting a 
> value corresponding to an integral layout to a wider carrier (e.g. OfInt to 
> long), in which case there's two option: a cast or Long::xyz.
> 
> After we said all this, we might want to drop a brief note that native Linker 
> might use signedness to model C unsigned types, but I'm on the fence here as 
> there's normally not many references from this javadoc to the Linker.

I've cut out references to the linker and shaved the text down a bit. See: 
https://github.com/openjdk/jdk/pull/33417/commits/d3eca5279cc0a4abaa63b12f59407d571942d340

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33417#discussion_r4402923707

Reply via email to