[foreign-memaccess+abi] Integrated: 8302346: Lift upcall sharing mechanism to AbstractLinker

Jorn Vernee jvernee at openjdk.org
Sun Feb 19 20:01:43 UTC 2023


On Tue, 14 Feb 2023 11:21:56 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Lift the upcall sharing mechanism to AbstractLinker, where it can live next to the similar mechanism for down calls. This also allows the fallback linker to use this mechanism.
> 
> Instead of an upcall stub, AbstractLinker::arrangeDowncall now return an UpcallStubFactory, which is a callback accepting a target MethodHandle and Arena, which are then used to construct the actual upcall stub.
> 
> Perhaps the trickiest part of this patch is that we have to simulate the effects of `SharedUtils::adaptUpcallForIMR` on the target method type. I've added a new method in SharedUtils, called `computeUpcallIMRType` for that, which mimics the shape of the `adaptUpcallForIMR` method.
> 
> Since the shape of most of the arrangeUpcall methods was very similar, I factored them out into a helper method in SharedUtils as well.

This pull request has now been integrated.

Changeset: 9664ae30
Author:    Jorn Vernee <jvernee at openjdk.org>
URL:       https://git.openjdk.org/panama-foreign/commit/9664ae3022ab3c2980df402009886bb0d971e742
Stats:     169 lines in 16 files changed: 53 ins; 54 del; 62 mod

8302346: Lift upcall sharing mechanism to AbstractLinker

Reviewed-by: mcimadamore

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

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


More information about the panama-dev mailing list