@@ -55,10 +55,11 @@ public final class NativeEntryPointInfo {
5555 private final boolean needsReturnBuffer ;
5656 private final boolean capturesState ;
5757 private final boolean needsTransition ;
58+ private final boolean usingAddressPairs ;
5859 private final boolean allowHeapAccess ;
5960
6061 private NativeEntryPointInfo (MethodType methodType , VMStorage [] cc , VMStorage [] returnBuffering , boolean needsReturnBuffer , boolean capturesState , boolean needsTransition ,
61- boolean allowHeapAccess ) {
62+ boolean usingAddressPairs , boolean allowHeapAccess ) {
6263 assert methodType .parameterCount () == cc .length ;
6364 assert needsReturnBuffer == (returnBuffering .length > 1 );
6465 // when no transition, allowHeapAccess is unused, so it must be set to false
@@ -69,6 +70,7 @@ private NativeEntryPointInfo(MethodType methodType, VMStorage[] cc, VMStorage[]
6970 this .needsReturnBuffer = needsReturnBuffer ;
7071 this .capturesState = capturesState ;
7172 this .needsTransition = needsTransition ;
73+ this .usingAddressPairs = usingAddressPairs ;
7274 this .allowHeapAccess = allowHeapAccess ;
7375 }
7476
@@ -78,6 +80,7 @@ public static NativeEntryPointInfo make(
7880 boolean needsReturnBuffer ,
7981 int capturedStateMask ,
8082 boolean needsTransition ,
83+ boolean usingAddressPairs ,
8184 boolean allowHeapAccess ) {
8285 if ((returnMoves .length > 1 ) != needsReturnBuffer ) {
8386 throw new AssertionError ("Multiple register return, but needsReturnBuffer was false" );
@@ -99,7 +102,7 @@ public static NativeEntryPointInfo make(
99102 */
100103 allowHeapAccess = false ;
101104 }
102- return new NativeEntryPointInfo (methodType , argMoves , returnMoves , needsReturnBuffer , capturedStateMask != 0 , needsTransition , allowHeapAccess );
105+ return new NativeEntryPointInfo (methodType , argMoves , returnMoves , needsReturnBuffer , capturedStateMask != 0 , needsTransition , usingAddressPairs , allowHeapAccess );
103106 }
104107
105108 public static Target_jdk_internal_foreign_abi_NativeEntryPoint makeEntryPoint (
@@ -109,8 +112,9 @@ public static Target_jdk_internal_foreign_abi_NativeEntryPoint makeEntryPoint(
109112 boolean needsReturnBuffer ,
110113 int capturedStateMask ,
111114 boolean needsTransition ,
115+ boolean usingAddressPairs ,
112116 boolean allowHeapAccess ) {
113- var info = make (argMoves , returnMoves , methodType , needsReturnBuffer , capturedStateMask , needsTransition , allowHeapAccess );
117+ var info = make (argMoves , returnMoves , methodType , needsReturnBuffer , capturedStateMask , needsTransition , usingAddressPairs , allowHeapAccess );
114118 long addr = ForeignFunctionsRuntime .singleton ().getDowncallStubPointer (info ).rawValue ();
115119 return new Target_jdk_internal_foreign_abi_NativeEntryPoint (info .methodType (), addr , capturedStateMask );
116120 }
@@ -153,13 +157,13 @@ public boolean equals(Object o) {
153157 return false ;
154158 }
155159 NativeEntryPointInfo that = (NativeEntryPointInfo ) o ;
156- return capturesState == that .capturesState && needsTransition == that .needsTransition && needsReturnBuffer == that .needsReturnBuffer && allowHeapAccess == that .allowHeapAccess &&
160+ return capturesState == that .capturesState && needsTransition == that .needsTransition && usingAddressPairs == that . usingAddressPairs && needsReturnBuffer == that .needsReturnBuffer && allowHeapAccess == that .allowHeapAccess &&
157161 Objects .equals (methodType , that .methodType ) &&
158162 Arrays .equals (parameterAssignments , that .parameterAssignments ) && Arrays .equals (returnBuffering , that .returnBuffering );
159163 }
160164
161165 @ Override
162166 public int hashCode () {
163- return Objects .hash (methodType , needsReturnBuffer , capturesState , needsTransition , allowHeapAccess , Arrays .hashCode (parameterAssignments ), Arrays .hashCode (returnBuffering ));
167+ return Objects .hash (methodType , needsReturnBuffer , capturesState , needsTransition , usingAddressPairs , allowHeapAccess , Arrays .hashCode (parameterAssignments ), Arrays .hashCode (returnBuffering ));
164168 }
165169}
0 commit comments