[foreign-abi] RFR: 8254260: Consider splitting binding recipe operators that serve a dual role [v3]
Jorn Vernee
jvernee at openjdk.java.net
Fri Oct 9 14:28:16 UTC 2020
On Fri, 9 Oct 2020 13:51:17 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since
>> the last revision:
>> - Merge branch 'foreign-abi' into Op_Split
>> - Review Comments
>> - - Split Move operator into VMStore and VMLoad
>> - Split Dereference operator into BufferStore and BufferLoad
>> - Add ToSegment operator for converting a MemoryAddress into a MemorySegment
>> - updated implementation and tests.
>
> src/jdk.incubator.foreign/share/classes/jdk/internal/foreign/abi/Binding.java line 218:
>
>> 216: MH_BASE_ADDRESS = lookup.findVirtual(MemorySegment.class, "address",
>> 217: methodType(MemoryAddress.class));
>> 218: MH_COPY_BUFFER = lookup.findStatic(Binding.Copy.class, "copyBuffer",
>
> I'm assuming these are only really required in the specialize() method of the various subclasses - should we move those
> constants there too?
We can, though we end up duplicating the try/catch & lookup code if we do, or would have to add some helper method, for
both findStatic and findVirtual. That's why I held off on doing that.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/375
More information about the panama-dev
mailing list