diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs index cd534cd29c01ba..d25dfcd400d6c3 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/InternalCalls.cs @@ -101,7 +101,7 @@ internal static class InternalCalls [RuntimeImport(RuntimeLibrary, "RhpNewArrayFast")] [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern unsafe object RhpNewArrayFast(MethodTable* pEEType, int length); + internal static extern unsafe object RhpNewArrayFast(MethodTable* pEEType, nint length); #if FEATURE_64BIT_ALIGNMENT [RuntimeImport(RuntimeLibrary, "RhpNewFastAlign8")] @@ -114,7 +114,7 @@ internal static class InternalCalls [RuntimeImport(RuntimeLibrary, "RhpNewArrayFastAlign8")] [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern unsafe object RhpNewArrayFastAlign8(MethodTable* pEEType, int length); + internal static extern unsafe object RhpNewArrayFastAlign8(MethodTable* pEEType, nint length); [RuntimeImport(RuntimeLibrary, "RhpNewFastMisalign")] [MethodImpl(MethodImplOptions.InternalCall)] diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs index 3570b7e72cffc3..63a9a23f6e73aa 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/RuntimeExports.cs @@ -56,7 +56,7 @@ public static unsafe object RhNewObject(MethodTable* pEEType) } [RuntimeExport("RhNewArray")] - public static unsafe object RhNewArray(MethodTable* pEEType, int length) + public static unsafe object RhNewArray(MethodTable* pEEType, nint length) { Debug.Assert(pEEType->IsSzArray); diff --git a/src/coreclr/nativeaot/Runtime/portable.cpp b/src/coreclr/nativeaot/Runtime/portable.cpp index 46fe1fbb7f7d79..21fcbd2507984c 100644 --- a/src/coreclr/nativeaot/Runtime/portable.cpp +++ b/src/coreclr/nativeaot/Runtime/portable.cpp @@ -88,7 +88,7 @@ FCIMPL1(Object *, RhpNewFinalizable, MethodTable* pEEType) } FCIMPLEND -FCIMPL2(Array *, RhpNewArrayFast, MethodTable * pArrayEEType, int numElements) +FCIMPL2(Array *, RhpNewArrayFast, MethodTable * pArrayEEType, intptr_t numElements) { Thread * pCurThread = ThreadStore::GetCurrentThread(); gc_alloc_context * acontext = pCurThread->GetAllocContext(); @@ -221,7 +221,7 @@ FCIMPL1(Object*, RhpNewFastMisalign, MethodTable* pEEType) } FCIMPLEND -FCIMPL2(Array*, RhpNewArrayFastAlign8, MethodTable* pArrayEEType, int numElements) +FCIMPL2(Array*, RhpNewArrayFastAlign8, MethodTable* pArrayEEType, intptr_t numElements) { Thread* pCurThread = ThreadStore::GetCurrentThread(); gc_alloc_context* acontext = pCurThread->GetAllocContext(); diff --git a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs index a9f862c684ec5b..1663dda8e088a8 100644 --- a/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs +++ b/src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/RuntimeImports.cs @@ -404,7 +404,7 @@ internal static IntPtr RhHandleAllocCrossReference(object value, IntPtr context) [MethodImpl(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhNewArray")] - internal static extern unsafe Array RhNewArray(MethodTable* pEEType, int length); + internal static extern unsafe Array RhNewArray(MethodTable* pEEType, nint length); [MethodImpl(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhNewVariableSizeObject")] diff --git a/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs b/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs index 7703d63dee84a0..09fea74227d5e6 100644 --- a/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs +++ b/src/coreclr/nativeaot/Test.CoreLib/src/System/Runtime/RuntimeImports.cs @@ -78,7 +78,7 @@ internal static IntPtr RhGetModuleSection(TypeManagerHandle module, ReadyToRunSe [MethodImpl(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhNewArray")] - private static extern unsafe Array RhNewArray(MethodTable* pEEType, int length); + private static extern unsafe Array RhNewArray(MethodTable* pEEType, nint length); [MethodImpl(MethodImplOptions.InternalCall)] [RuntimeImport(RuntimeLibrary, "RhNewString")]