[foreign-memaccess+abi] RFR: 8313680: Disallow combining caputreCallState with isTrivial

Maurizio Cimadamore mcimadamore at openjdk.org
Sat Aug 5 23:08:45 UTC 2023


On Thu, 3 Aug 2023 11:26:40 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Native functions that modify call state (errno) are by definition not 'trivial'. Capturing call state would also prevent intrinsification of a trivial call. I think to be on the safe side, we just want to disallow combining these two for now.
>
> src/java.base/share/classes/java/lang/foreign/Linker.java line 733:
> 
>> 731:          *
>> 732:          * @apiNote This linker option can not be combined with {@link #isTrivial}.
>> 733:          *
> 
> I'm not sure if we should a similar API note on `isTrivial`. Just having one here seems enough?

I think it's enough to have it here

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

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/856#discussion_r1285132329


More information about the panama-dev mailing list