[foreign-memaccess+abi] RFR: 8299911: Refactor struct handling in AArch64 CallArranger [v2]
Jorn Vernee
jvernee at openjdk.org
Wed Jan 11 13:00:17 UTC 2023
On Wed, 11 Jan 2023 12:47:36 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/foreign/abi/aarch64/CallArranger.java line 302:
>>
>>> 300: if (isFieldWise) {
>>> 301: // fields only, no padding
>>> 302: copyLayout = (ValueLayout) layout.memberLayouts().get(i);
>>
>> Doesn't this contradict the comment? E.g. if we only copy fields, then we should skip padding layouts here (as they can be members of a group layout) ?
>
> The cast would fail if we ran into a padding layout, so there is an implicit assumption that we will not see any padding. I added the comment there to emphasize that. If we could have padding at this point, the offset computation we do later would also be incorrect.
I've attempted to clarify the comment a bit.
-------------
PR: https://git.openjdk.org/panama-foreign/pull/765
More information about the panama-dev
mailing list