using System; using System.Runtime.InteropServices; namespace System.Reflection.Emit { /// Describes a Microsoft intermediate language (MSIL) instruction. // Token: 0x0200020A RID: 522 [ComVisible(true)] public struct OpCode { // Token: 0x06001BC1 RID: 7105 RVA: 0x00067DC0 File Offset: 0x00065FC0 internal OpCode(int p, int q) { this.op1 = (byte)(p & 255); this.op2 = (byte)((p >> 8) & 255); this.push = (byte)((p >> 16) & 255); this.pop = (byte)((p >> 24) & 255); this.size = (byte)(q & 255); this.type = (byte)((q >> 8) & 255); this.args = (byte)((q >> 16) & 255); this.flow = (byte)((q >> 24) & 255); } /// Returns the generated hash code for this Opcode. /// Returns the hash code for this instance. // Token: 0x06001BC2 RID: 7106 RVA: 0x00067E50 File Offset: 0x00066050 public override int GetHashCode() { return this.Name.GetHashCode(); } /// Tests whether the given object is equal to this Opcode. /// true if is an instance of Opcode and is equal to this object; otherwise, false. /// The object to compare to this object. // Token: 0x06001BC3 RID: 7107 RVA: 0x00067E60 File Offset: 0x00066060 public override bool Equals(object obj) { if (obj == null || !(obj is OpCode)) { return false; } OpCode opCode = (OpCode)obj; return opCode.op1 == this.op1 && opCode.op2 == this.op2; } /// Indicates whether the current instance is equal to the specified . /// true if the value of is equal to the value of the current instance; otherwise, false. /// The to compare to the current instance. // Token: 0x06001BC4 RID: 7108 RVA: 0x00067EAC File Offset: 0x000660AC public bool Equals(OpCode obj) { return obj.op1 == this.op1 && obj.op2 == this.op2; } /// Returns this Opcode as a . /// Returns a containing the name of this Opcode. // Token: 0x06001BC5 RID: 7109 RVA: 0x00067EE0 File Offset: 0x000660E0 public override string ToString() { return this.Name; } /// The name of the Microsoft intermediate language (MSIL) instruction. /// Read-only. The name of the MSIL instruction. // Token: 0x170004F3 RID: 1267 // (get) Token: 0x06001BC6 RID: 7110 RVA: 0x00067EE8 File Offset: 0x000660E8 public string Name { get { if (this.op1 == 255) { return OpCodeNames.names[(int)this.op2]; } return OpCodeNames.names[256 + (int)this.op2]; } } /// The size of the Microsoft intermediate language (MSIL) instruction. /// Read-only. The size of the MSIL instruction. // Token: 0x170004F4 RID: 1268 // (get) Token: 0x06001BC7 RID: 7111 RVA: 0x00067F1C File Offset: 0x0006611C public int Size { get { return (int)this.size; } } /// The type of Microsoft intermediate language (MSIL) instruction. /// Read-only. The type of Microsoft intermediate language (MSIL) instruction. // Token: 0x170004F5 RID: 1269 // (get) Token: 0x06001BC8 RID: 7112 RVA: 0x00067F24 File Offset: 0x00066124 public OpCodeType OpCodeType { get { return (OpCodeType)this.type; } } /// The operand type of an Microsoft intermediate language (MSIL) instruction. /// Read-only. The operand type of an MSIL instruction. // Token: 0x170004F6 RID: 1270 // (get) Token: 0x06001BC9 RID: 7113 RVA: 0x00067F2C File Offset: 0x0006612C public OperandType OperandType { get { return (OperandType)this.args; } } /// The flow control characteristics of the Microsoft intermediate language (MSIL) instruction. /// Read-only. The type of flow control. // Token: 0x170004F7 RID: 1271 // (get) Token: 0x06001BCA RID: 7114 RVA: 0x00067F34 File Offset: 0x00066134 public FlowControl FlowControl { get { return (FlowControl)this.flow; } } /// How the Microsoft intermediate language (MSIL) instruction pops the stack. /// Read-only. The way the MSIL instruction pops the stack. // Token: 0x170004F8 RID: 1272 // (get) Token: 0x06001BCB RID: 7115 RVA: 0x00067F3C File Offset: 0x0006613C public StackBehaviour StackBehaviourPop { get { return (StackBehaviour)this.pop; } } /// How the Microsoft intermediate language (MSIL) instruction pushes operand onto the stack. /// Read-only. The way the MSIL instruction pushes operand onto the stack. // Token: 0x170004F9 RID: 1273 // (get) Token: 0x06001BCC RID: 7116 RVA: 0x00067F44 File Offset: 0x00066144 public StackBehaviour StackBehaviourPush { get { return (StackBehaviour)this.push; } } /// The value of the immediate operand of the Microsoft intermediate language (MSIL) instruction. /// Read-only. The value of the immediate operand of the MSIL instruction. // Token: 0x170004FA RID: 1274 // (get) Token: 0x06001BCD RID: 7117 RVA: 0x00067F4C File Offset: 0x0006614C public short Value { get { if (this.size == 1) { return (short)this.op2; } return (short)(((int)this.op1 << 8) | (int)this.op2); } } /// Indicates whether two structures are equal. /// true if is equal to ; otherwise, false. /// The to compare to . /// The to compare to . // Token: 0x06001BCE RID: 7118 RVA: 0x00067F74 File Offset: 0x00066174 public static bool operator ==(OpCode a, OpCode b) { return a.op1 == b.op1 && a.op2 == b.op2; } /// Indicates whether two structures are not equal. /// true if is not equal to ; otherwise, false. /// The to compare to . /// The to compare to . // Token: 0x06001BCF RID: 7119 RVA: 0x00067FA8 File Offset: 0x000661A8 public static bool operator !=(OpCode a, OpCode b) { return a.op1 != b.op1 || a.op2 != b.op2; } // Token: 0x0400084F RID: 2127 internal byte op1; // Token: 0x04000850 RID: 2128 internal byte op2; // Token: 0x04000851 RID: 2129 private byte push; // Token: 0x04000852 RID: 2130 private byte pop; // Token: 0x04000853 RID: 2131 private byte size; // Token: 0x04000854 RID: 2132 private byte type; // Token: 0x04000855 RID: 2133 private byte args; // Token: 0x04000856 RID: 2134 private byte flow; } }