[foreign-memaccess+abi] RFR: 8317324: Add an overload to bind a memory segment var handle at an offset

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Sep 29 17:48:59 UTC 2023


On Fri, 29 Sep 2023 16:23:51 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Do we need an overload for `ValueLayout::varHandle` as well? That method allows accessing the var handle cache on a ValueLayout, but the overload would always have to create a new VarHandle with the bound coordinate (unless we want a specialized cache for `0` offset maybe...). So, I don't think having on overload there is super important.

Good point. As you mention, that overload would have to spin a new MH (unless we add another cached stable field somewhere - but that would have to special case `0L` somehow). So, I think the current combination of overloads is fine.

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

PR Comment: https://git.openjdk.org/panama-foreign/pull/900#issuecomment-1741234819


More information about the panama-dev mailing list