ABlock.cs 732 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections.Generic;
  2. namespace ChocolArm64.Decoder
  3. {
  4. class ABlock
  5. {
  6. public long Position { get; set; }
  7. public long EndPosition { get; set; }
  8. public ABlock Next { get; set; }
  9. public ABlock Branch { get; set; }
  10. public List<AOpCode> OpCodes { get; private set; }
  11. public ABlock()
  12. {
  13. OpCodes = new List<AOpCode>();
  14. }
  15. public ABlock(long Position) : this()
  16. {
  17. this.Position = Position;
  18. }
  19. public AOpCode GetLastOp()
  20. {
  21. if (OpCodes.Count > 0)
  22. {
  23. return OpCodes[OpCodes.Count - 1];
  24. }
  25. return null;
  26. }
  27. }
  28. }