mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-25 18:35:33 +00:00
31 lines
641 B
C#
31 lines
641 B
C#
|
using System;
|
||
|
|
||
|
namespace ARMeilleure.CodeGen.RegisterAllocators
|
||
|
{
|
||
|
struct LiveRange : IComparable<LiveRange>
|
||
|
{
|
||
|
public int Start { get; }
|
||
|
public int End { get; }
|
||
|
|
||
|
public LiveRange(int start, int end)
|
||
|
{
|
||
|
Start = start;
|
||
|
End = end;
|
||
|
}
|
||
|
|
||
|
public int CompareTo(LiveRange other)
|
||
|
{
|
||
|
if (Start < other.End && other.Start < End)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
return Start.CompareTo(other.Start);
|
||
|
}
|
||
|
|
||
|
public override string ToString()
|
||
|
{
|
||
|
return $"[{Start}, {End}[";
|
||
|
}
|
||
|
}
|
||
|
}
|