On Fri, 20 Feb 2026 13:18:47 GMT, Chen Liang <[email protected]> wrote:

>> Of course. But I interpreted `hasOopsCase` meaning "does this container 
>> contain oops" whereby the `[]` is the container and the `int` is the field. 
>> So is `hasOopsCase` only called on the element of the array rather than the 
>> container?
>
> This really means the layout of a field of the given type has oops when it is 
> inlined. I think this is clear enough.

I disagree. The JavaDoc specifies `{@return whether a flat layout of this class 
contains references}` . So if we replace "class", with "int[]", we read: 
"whether a flat layout of int[] contains references". The method returns true, 
but in the context of the documentation it shouldn't (an int[] is always flat 
and certainly does not contain oops). 

This is not my area and if you insist/others are fine with it, I'm happy to 
agree to disagree.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2143#discussion_r2833182077

Reply via email to