/// <summary> /// Move the reader's position to the marked position. /// </summary> /// <param name="mark"></param> public void Seek(IL.Label mark) { this.i = mark.pos; }
/// <summary> /// Construct an instruction. /// </summary> /// <param name="reader">The reader that created this instruction.</param> /// <param name="op">The instruction opcode.</param> /// <param name="label">The instruction's address in the bytecode.</param> public Instruction(ILReader reader, OpCode op, IL.Label label) : this(reader, op, default(Operand), label) { }
/// <summary> /// Construct an operand from a value. /// </summary> /// <param name="x">The operand value.</param> public Operand(IL.Label x) : this() { this.Label = x; }
/// <summary> /// Construct an instruction. /// </summary> /// <param name="reader">The reader that created this instruction.</param> /// <param name="op">The instruction opcode.</param> /// <param name="arg">The instruction operand.</param> /// <param name="label">The instruction's address in the bytecode.</param> public Instruction(ILReader reader, OpCode op, Operand arg, IL.Label label) : this(reader, op, arg, (ushort)label.pos) { }