CacheEntry.cs 644 B

1234567891011121314151617181920212223242526
  1. using ARMeilleure.CodeGen.Unwinding;
  2. using System;
  3. using System.Diagnostics.CodeAnalysis;
  4. namespace ARMeilleure.Translation.Cache
  5. {
  6. readonly struct CacheEntry : IComparable<CacheEntry>
  7. {
  8. public int Offset { get; }
  9. public int Size { get; }
  10. public UnwindInfo UnwindInfo { get; }
  11. public CacheEntry(int offset, int size, UnwindInfo unwindInfo)
  12. {
  13. Offset = offset;
  14. Size = size;
  15. UnwindInfo = unwindInfo;
  16. }
  17. public int CompareTo([AllowNull] CacheEntry other)
  18. {
  19. return Offset.CompareTo(other.Offset);
  20. }
  21. }
  22. }