[foreign-abi] RFR: 8248560: Specify the behaviour of the ForeignLinker returned by CSupport::getSystemLinker [v4]
Maurizio Cimadamore
mcimadamore at openjdk.java.net
Wed Sep 16 11:57:10 UTC 2020
On Wed, 16 Sep 2020 11:41:25 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Remove public attribute name prefix
>
> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java line 136:
>
>> 134: * the corresponding native stub will be deallocated.</p>
>> 135: *
>> 136: * <p>The method type of the target method handle is used for linking</p>
>
> I think we can leave this out
@PaulSandoz mentioned (and I agree) that the terms upcalls and downcalls are colloquial, in the sense that it's
technically possible to pass an upcall stub to `downcallHandle`, so that it's no longer really making a downcall and,
conversely, it's possible to pass a native method handle to `upcallStub` so that it will not, strictly speaking,
execute an upcall to Java.
I think the real nature of what we're describing here is:
* given an address and a function descriptor, obtain a MethodHandle which can be used to execute the code at that address
from Java code
* given a MethodHandle and a function descriptor, obtain a memory segment, whose base address can be passed to native
code where a function pointer is expected
I don't know if the terms downcallHandle and upcallStub are the best to describe what these do.
-------------
PR: https://git.openjdk.java.net/panama-foreign/pull/327
More information about the panama-dev
mailing list