misc: chore: Use explicit types in CPU project

This commit is contained in:
Evan Husted
2025-01-25 14:04:43 -06:00
parent a97fd4beb1
commit 5099548856
18 changed files with 40 additions and 40 deletions

View File

@@ -127,7 +127,7 @@ namespace Ryujinx.Cpu.Jit.HostTracked
Debug.Assert(leftSize > 0);
Debug.Assert(rightSize > 0);
(var leftAllocation, PrivateAllocation) = PrivateAllocation.Split(leftSize);
(PrivateMemoryAllocation leftAllocation, PrivateAllocation) = PrivateAllocation.Split(leftSize);
PrivateMapping left = new(Address, leftSize, leftAllocation);

View File

@@ -253,13 +253,13 @@ namespace Ryujinx.Cpu.Jit
yield break;
}
var guestRegions = GetPhysicalRegionsImpl(va, size);
IEnumerable<MemoryRange> guestRegions = GetPhysicalRegionsImpl(va, size);
if (guestRegions == null)
{
yield break;
}
foreach (var guestRegion in guestRegions)
foreach (MemoryRange guestRegion in guestRegions)
{
nint pointer = _backingMemory.GetPointer(guestRegion.Address, guestRegion.Size);
yield return new HostMemoryRange((nuint)(ulong)pointer, guestRegion.Size);
@@ -274,7 +274,7 @@ namespace Ryujinx.Cpu.Jit
yield break;
}
foreach (var physicalRegion in GetPhysicalRegionsImpl(va, size))
foreach (MemoryRange physicalRegion in GetPhysicalRegionsImpl(va, size))
{
yield return physicalRegion;
}

View File

@@ -340,7 +340,7 @@ namespace Ryujinx.Cpu.Jit
{
int pages = GetPagesCount(va, (uint)size, out va);
var regions = new List<MemoryRange>();
List<MemoryRange> regions = new List<MemoryRange>();
ulong regionStart = GetPhysicalAddressChecked(va);
ulong regionSize = PageSize;

View File

@@ -240,7 +240,7 @@ namespace Ryujinx.Cpu.Jit
if (TryGetVirtualContiguous(va, data.Length, out MemoryBlock memoryBlock, out ulong offset))
{
var target = memoryBlock.GetSpan(offset, data.Length);
Span<byte> target = memoryBlock.GetSpan(offset, data.Length);
bool changed = !data.SequenceEqual(target);
@@ -443,7 +443,7 @@ namespace Ryujinx.Cpu.Jit
return null;
}
var regions = new List<HostMemoryRange>();
List<HostMemoryRange> regions = new List<HostMemoryRange>();
ulong endVa = va + size;
try