[foreign-memaccess+abi] RFR: 8275644: Replace VMReg in shuffling code with something more fine grained.

Jorn Vernee jvernee at openjdk.org
Wed Aug 10 11:38:57 UTC 2022


On Tue, 9 Aug 2022 15:13:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> I did my best to make the C++ `VMStorage` class fit into 64-bits, so we can rely on a scalarized ABI on all platforms. It doesn't matter that much though.
>> 
>> As you say, the class is mirrored in the VM code as well (in javaClass.hpp/cpp). Splitting the Java class into 2 would mean almost double the VM code that binds the class, since we then need to bind to the 2 subclasses as well.
>> 
>> I would like to avoid going there. Another option would be to use 2 fields, one for segment mask and one for size. But, that doesn't seem that much better. And, it also seems nice to mirror the C++ VMStorage class which uses a union for these 2 fields (in order to stay within 64-bits of size for the class).
>
> That's ok, I suspected something similar was at play. In that case I suggest a uniform naming scheme, plus perhaps some documents explaining the semantics of the fields in the various cases.

I can add some comments to the fields. What do you mean by 'uniform naming scheme'?

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

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


More information about the panama-dev mailing list