[foreign-memaccess+abi] RFR: 8292047: Consider ways to add linkage parameters to downcall handles [v2]
Jorn Vernee
jvernee at openjdk.org
Thu Sep 22 14:56:26 UTC 2022
> This patch implements a linker option interface, that can be using to indicate additional linkage requirements to the linker.
>
> The variadic function descriptor support is dropped in favor of using a linker option to indicate the first variadic argument index. I think the switch turned out to be straight forward for users of this feature as well, though a bit more verbose.
>
> I also experimented with putting linker options on FunctionDescriptor directly, but it increases the complexity of the combinators of FunctionDescriptor. For instance, if an argument layout is inserted somewhere, should the variadic index option also be updated? (a similar issue arises if we support other linker options that include parameter list indexes). As a result of that, it seemed simpler to just move the linker options as an additional argument to a link request, since at that point we know the descriptor won't change anymore.
>
> Another design decision is to only allow a single instance of a linker option of a certain type (and they are stored internally in a `Map<Class<?>, Option>` as well). This makes it easier to determine whether a combination of linker options is valid.
>
> Other option kinds that could be added in the future are listed in the JBS issue, but not part of this patch.
Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
characteristic -> option
-------------
Changes:
- all: https://git.openjdk.org/panama-foreign/pull/734/files
- new: https://git.openjdk.org/panama-foreign/pull/734/files/591cf1ea..8bb13e3d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=panama-foreign&pr=734&range=01
- incr: https://webrevs.openjdk.org/?repo=panama-foreign&pr=734&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/panama-foreign/pull/734.diff
Fetch: git fetch https://git.openjdk.org/panama-foreign pull/734/head:pull/734
PR: https://git.openjdk.org/panama-foreign/pull/734
More information about the panama-dev
mailing list