On Wed, 27 Nov 2024 19:21:55 GMT, Maurizio Cimadamore <mcimadam...@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

Reply via email to