Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

[Interpreter] Array #6965

Merged
merged 13 commits into from
Feb 12, 2019
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@

using Volatile = System.Threading.Volatile;

#if BIT64
jkotas marked this conversation as resolved.
Show resolved Hide resolved
using nuint = System.UInt64;
#else
using nuint = System.UInt32;
#endif

namespace Internal.Runtime.Augments
{
[ReflectionBlocked]
Expand Down Expand Up @@ -158,6 +164,17 @@ public static unsafe Array NewMultiDimArray(RuntimeTypeHandle typeHandleForArray
return Array.NewMultiDimArray(typeHandleForArrayType.ToEETypePtr(), pLengths, lengths.Length);
}

public static ref byte GetRawDataForArray(Array array)
{
return ref array.GetRawArrayData();
}

[CLSCompliant(false)]
public static nuint GetElementSizeForArray(Array array)
{
return array.ElementSize;
}

public static IntPtr GetAllocateObjectHelperForType(RuntimeTypeHandle type)
{
return RuntimeImports.RhGetRuntimeHelperForType(CreateEETypePtr(type), RuntimeImports.RuntimeHelperKind.AllocateObject);
Expand Down
Loading