Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/nativeaot/Runtime/portable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Loading