mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-10-09 20:58:54 +02:00
Revert "misc: chore: Remove redundant code"
This reverts commit 05a88ccc94.
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
Size = size;
|
||||
}
|
||||
|
||||
public int CompareTo(CacheEntry other)
|
||||
public int CompareTo([AllowNull] CacheEntry other)
|
||||
{
|
||||
return Offset.CompareTo(other.Offset);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
Size = size;
|
||||
}
|
||||
|
||||
public int CompareTo(MemoryBlock other)
|
||||
public int CompareTo([AllowNull] MemoryBlock other)
|
||||
{
|
||||
return Offset.CompareTo(other.Offset);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
private static readonly Lock _lock = new();
|
||||
private static bool _initialized;
|
||||
private static readonly List<ReservedRegion> _jitRegions = [];
|
||||
private static int _activeRegionIndex;
|
||||
private static int _activeRegionIndex = 0;
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
[LibraryImport("kernel32.dll", SetLastError = true)]
|
||||
@@ -75,9 +75,12 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
|
||||
if (OperatingSystem.IsMacOS() && RuntimeInformation.ProcessArchitecture == Architecture.Arm64)
|
||||
{
|
||||
fixed (byte* codePtr = code)
|
||||
unsafe
|
||||
{
|
||||
JitSupportDarwin.Copy(funcPtr, (IntPtr)codePtr, (ulong)code.Length);
|
||||
fixed (byte* codePtr = code)
|
||||
{
|
||||
JitSupportDarwin.Copy(funcPtr, (IntPtr)codePtr, (ulong)code.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Ryujinx.Cpu.LightningJit.Cache
|
||||
Size = size;
|
||||
}
|
||||
|
||||
public int CompareTo(Range other)
|
||||
public int CompareTo([AllowNull] Range other)
|
||||
{
|
||||
return Offset.CompareTo(other.Offset);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user