RFR: 8336768: Allow captureCallState and critical linker options to be combined

Jorn Vernee jvernee at openjdk.org
Thu Nov 28 12:38:48 UTC 2024


On Wed, 27 Nov 2024 19:21:55 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/foreign/abi/NativeEntryPoint.java line 91:
>> 
>>> 89:         int checkIdx = 1;
>>> 90:         if ((needsReturnBuffer && methodType.parameterType(checkIdx++) != long.class)
>>> 91:             || (savedValueMask != 0 &&
>> 
>> Maybe this routine is getting too complex and it would be better to split the checks (and add some comments) ? E.g. we need to check that if there's a return buffer, a certain low-level argument is `long` and, if there's need to capture state, we either have `long`, or an `Object,long` pair.
>
> Perhaps, even throwing different assertion error might help

Yeah... I'll split this up a bit to make it more readable.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22327#discussion_r1862099011


More information about the core-libs-dev mailing list