[foreign-memaccess+abi] RFR: 8302346: Lift upcall sharing mechanism to AbstractLinker [v3]
Jorn Vernee
jvernee at openjdk.org
Fri Feb 17 22:15:15 UTC 2023
> 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.
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 eight additional commits since the last revision:
- Merge branch 'foreign-memaccess+abi' into Lazy_Upcalls
- use fake MH for adaptation
- fix zero
- tweak visibility
- polish3
- polish2
- polish
- Make upcall creation lazy at the AbstractLinker level
-------------
Changes:
- all: https://git.openjdk.org/panama-foreign/pull/791/files
- new: https://git.openjdk.org/panama-foreign/pull/791/files/6bd745f8..aa5e075d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=panama-foreign&pr=791&range=02
- incr: https://webrevs.openjdk.org/?repo=panama-foreign&pr=791&range=01-02
Stats: 47376 lines in 990 files changed: 17838 ins; 15404 del; 14134 mod
Patch: https://git.openjdk.org/panama-foreign/pull/791.diff
Fetch: git fetch https://git.openjdk.org/panama-foreign pull/791/head:pull/791
PR: https://git.openjdk.org/panama-foreign/pull/791
More information about the panama-dev
mailing list