2 // Mono.ILASM.MethodInstr
5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
14 namespace Mono.ILASM {
16 public class MethodInstr : IInstr {
18 private PEAPI.MethodOp op;
19 private IMethodRef operand;
21 public MethodInstr (PEAPI.MethodOp op, IMethodRef operand)
24 this.operand = operand;
26 if (op == PEAPI.MethodOp.newobj || op == PEAPI.MethodOp.callvirt)
27 operand.CallConv |= PEAPI.CallConv.Instance;
30 public void Emit (CodeGen code_gen, MethodDef meth,
31 PEAPI.CILInstructions cil)
33 operand.Resolve (code_gen);
34 cil.MethInst (op, operand.PeapiMethod);