public static Instruction Create(OpCode opcode, Instruction[] targets)
        {
            if (targets == null)
                throw new ArgumentNullException("targets");
            if (opcode.OperandType != OperandType.InlineSwitch)
                throw new ArgumentException("opcode");

            return new Instruction(opcode, targets);
        }
 public Instruction Create(OpCode opcode, CallSite site)
 {
     return Instruction.Create(opcode, site);
 }
 public Instruction Create(OpCode opcode, FieldReference field)
 {
     return Instruction.Create(opcode, field);
 }
 public void Emit(OpCode opcode, VariableDefinition variable)
 {
     Append(Create(opcode, variable));
 }
 public Instruction Create(OpCode opcode)
 {
     return Instruction.Create(opcode);
 }
 public void Emit(OpCode opcode, long value)
 {
     Append(Create(opcode, value));
 }
 public void Emit(OpCode opcode, double value)
 {
     Append(Create(opcode, value));
 }
 static void MakeMacro(Instruction instruction, OpCode opcode)
 {
     instruction.OpCode = opcode;
     instruction.Operand = null;
 }
        public Instruction Create(OpCode opcode, int value)
        {
            if (opcode.OperandType == OperandType.InlineVar)
                return Instruction.Create(opcode, body.Variables[value]);

            if (opcode.OperandType == OperandType.InlineArg)
                return Instruction.Create(opcode, body.GetParameter(value));

            return Instruction.Create(opcode, value);
        }
Esempio n. 10
0
 internal Instruction(OpCode opcode, object operand)
 {
     this.opcode = opcode;
     this.operand = operand;
 }
 static void ExpandMacro(Instruction instruction, OpCode opcode, object operand)
 {
     instruction.OpCode = opcode;
     instruction.Operand = operand;
 }
Esempio n. 12
0
 internal Instruction(int offset, OpCode opCode)
 {
     this.offset = offset;
     this.opcode = opCode;
 }
Esempio n. 13
0
        public static Instruction Create(OpCode opcode, ParameterDefinition parameter)
        {
            if (parameter == null)
                throw new ArgumentNullException("parameter");
            if (opcode.OperandType != OperandType.ShortInlineArg &&
                opcode.OperandType != OperandType.InlineArg)
                throw new ArgumentException("opcode");

            return new Instruction(opcode, parameter);
        }
Esempio n. 14
0
        public static Instruction Create(OpCode opcode, VariableDefinition variable)
        {
            if (variable == null)
                throw new ArgumentNullException("variable");
            if (opcode.OperandType != OperandType.ShortInlineVar &&
                opcode.OperandType != OperandType.InlineVar)
                throw new ArgumentException("opcode");

            return new Instruction(opcode, variable);
        }
Esempio n. 15
0
 public void Emit(OpCode opcode, CallSite site)
 {
     Append(Create(opcode, site));
 }
Esempio n. 16
0
 public Instruction Create(OpCode opcode, double value)
 {
     return Instruction.Create(opcode, value);
 }
Esempio n. 17
0
 public void Emit(OpCode opcode, FieldReference field)
 {
     Append(Create(opcode, field));
 }
Esempio n. 18
0
 public Instruction Create(OpCode opcode, Instruction[] targets)
 {
     return Instruction.Create(opcode, targets);
 }
Esempio n. 19
0
 public void Emit(OpCode opcode, float value)
 {
     Append(Create(opcode, value));
 }
Esempio n. 20
0
 public Instruction Create(OpCode opcode, VariableDefinition variable)
 {
     return Instruction.Create(opcode, variable);
 }
Esempio n. 21
0
 public void Emit(OpCode opcode, Instruction[] targets)
 {
     Append(Create(opcode, targets));
 }
Esempio n. 22
0
 public Instruction Create(OpCode opcode, ParameterDefinition parameter)
 {
     return Instruction.Create(opcode, parameter);
 }
Esempio n. 23
0
 public void Emit(OpCode opcode, ParameterDefinition parameter)
 {
     Append(Create(opcode, parameter));
 }
Esempio n. 24
0
 public void Emit(OpCode opcode)
 {
     Append(Create(opcode));
 }
Esempio n. 25
0
 public Instruction Create(OpCode opcode, TypeReference type)
 {
     return Instruction.Create(opcode, type);
 }
Esempio n. 26
0
 public void Emit(OpCode opcode, TypeReference type)
 {
     Append(Create(opcode, type));
 }
Esempio n. 27
0
 public Instruction Create(OpCode opcode, MethodReference method)
 {
     return Instruction.Create(opcode, method);
 }
Esempio n. 28
0
 public void Emit(OpCode opcode, MethodReference method)
 {
     Append(Create(opcode, method));
 }
Esempio n. 29
0
 void WriteOpCode(OpCode opcode)
 {
     if (opcode.Size == 1)
     {
         WriteByte(opcode.Op2);
     }
     else
     {
         WriteByte(opcode.Op1);
         WriteByte(opcode.Op2);
     }
 }
Esempio n. 30
0
        public static Instruction Create(OpCode opcode, Instruction target)
        {
            if (target == null)
                throw new ArgumentNullException("target");
            if (opcode.OperandType != OperandType.InlineBrTarget &&
                opcode.OperandType != OperandType.ShortInlineBrTarget)
                throw new ArgumentException("opcode");

            return new Instruction(opcode, target);
        }