Example #1
0
 public override void Emit(CodeGen code_gen, MethodDef meth,
                           PEAPI.CILInstructions cil)
 {
     if (field_ref != null)
     {
         field_ref.Resolve(code_gen);
         cil.FieldInst(PEAPI.FieldOp.ldtoken,
                       field_ref.PeapiField);
     }
     else if (method_ref != null)
     {
         method_ref.Resolve(code_gen);
         cil.MethInst(PEAPI.MethodOp.ldtoken,
                      method_ref.PeapiMethod);
     }
     else if (type_ref != null)
     {
         type_ref.Resolve(code_gen);
         cil.TypeInst(PEAPI.TypeOp.ldtoken,
                      type_ref.PeapiType);
     }
 }
Example #2
0
 public override void Emit(CodeGen code_gen, MethodDef meth,
                           PEAPI.CILInstructions cil)
 {
     operand.Resolve(code_gen);
     cil.TypeInst(op, operand.PeapiType);
 }