ScopeVariable.cs 662 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace Mono.CompilerServices.SymbolWriter
  3. {
  4. public struct ScopeVariable
  5. {
  6. public readonly int Scope;
  7. public readonly int Index;
  8. public ScopeVariable(int scope, int index)
  9. {
  10. this.Scope = scope;
  11. this.Index = index;
  12. }
  13. internal ScopeVariable(MyBinaryReader reader)
  14. {
  15. this.Scope = reader.ReadLeb128();
  16. this.Index = reader.ReadLeb128();
  17. }
  18. //internal void Write(MyBinaryWriter bw)
  19. //{
  20. // bw.WriteLeb128(this.Scope);
  21. // bw.WriteLeb128(this.Index);
  22. //}
  23. public override string ToString()
  24. {
  25. return string.Format("[ScopeVariable {0}:{1}]", this.Scope, this.Index);
  26. }
  27. }
  28. }