[foreign-memaccess+abi] RFR: 8287516: Implement fallback Linker [v3]

Jorn Vernee jvernee at openjdk.org
Thu Jan 19 12:27:35 UTC 2023


On Thu, 19 Jan 2023 12:06:10 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Note that we don't use this on any of the user supplied layouts. This is only used to compute the layout of `ffi_type` in `FFIType`. On 64bit platforms this needs padding, on 32bit platforms it does not.
>> 
>> I can move it into `FFIType` as well, but it seemed like a more general piece of functionality (i.e. maybe we could change the CallGeneratorHelper test class to use this instead)
>
> Yep - I've seen that. I guess perhaps what I find confusing is the name - e.g. one might thing that MemoryLayout.structLayout should call this, but it doesn't. But I don't have any great suggestions. Perhaps I'd stress the alignment, so maybe "computePaddedStructLayout" would be clearer?

Done. Added a javadoc comment as well.

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

PR: https://git.openjdk.org/panama-foreign/pull/770


More information about the panama-dev mailing list