misc: Replace references to IntPtr/UIntPtr with nint/nuint + code cleanups.

This commit is contained in:
Evan Husted 2024-10-26 08:46:41 -05:00
parent a09d314817
commit dfb4854d19
172 changed files with 902 additions and 914 deletions

View file

@ -32,7 +32,7 @@ namespace ARMeilleure.IntermediateRepresentation
/// <exception cref="ArgumentException"><typeparamref name="T"/> is not pointer sized.</exception>
public IntrusiveList()
{
if (Unsafe.SizeOf<T>() != IntPtr.Size)
if (Unsafe.SizeOf<T>() != nint.Size)
{
throw new ArgumentException("T must be a reference type or a pointer sized struct.");
}

View file

@ -24,7 +24,7 @@ namespace ARMeilleure.IntermediateRepresentation
{
Debug.Assert(operand.Kind == OperandKind.Memory);
_data = (Data*)Unsafe.As<Operand, IntPtr>(ref operand);
_data = (Data*)Unsafe.As<Operand, nint>(ref operand);
}
public Operand BaseAddress

View file

@ -228,7 +228,7 @@ namespace ARMeilleure.IntermediateRepresentation
public readonly override int GetHashCode()
{
return HashCode.Combine((IntPtr)_data);
return HashCode.Combine((nint)_data);
}
public static bool operator ==(Operation a, Operation b)