RFR: 8308645: Javadoc of FFM API needs to be refreshed [v4]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Jun 2 11:10:09 UTC 2023
On Thu, 1 Jun 2023 21:02:13 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/foreign/MemoryLayout.java line 418:
>>
>>> 416: *
>>> 417: * @param elements the layout path elements.
>>> 418: * @return a var handle that accesses a memory segment at the offset selected by the given layout path.
>>
>> This doesn't seem quite right. It is not the memory segment which is found at the offset given by the layout path, it is the base address.
>>
>> Maybe:
>> Suggestion:
>>
>> * @return a var handle that accesses a memory segment whose base address is found at the offset selected by the given layout path.
>
> Yeah - I meant what you said - but now that you said it, I also saw how what I've written can be prone to an alternate (and wrong) interpretation. I'll clarify.
Actually, looking back at this I'm not sure it's correct? We have an input memory segment MS. And a layout path. A layout path identifies an offset O at which MS has to be accessed in order to read a value (of some type). I'm not sure any of this depends on "base address" ?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14098#discussion_r1214235804
More information about the core-libs-dev
mailing list