2010-04-01 Jb Evain <jbevain@novell.com>
[mcs.git] / ilasm / codegen / FieldInstr.cs
blob02bb5b698726841d62c7bfbc8550972e929ffc44
1 //
2 // Mono.ILASM.FieldInstr
3 //
4 // Author(s):
5 // Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
11 using System;
14 namespace Mono.ILASM {
16 public class FieldInstr : IInstr {
18 private PEAPI.FieldOp op;
19 private IFieldRef operand;
21 public FieldInstr (PEAPI.FieldOp op, IFieldRef operand, Location loc)
22 : base (loc)
24 this.op = op;
25 this.operand = operand;
28 public override void Emit (CodeGen code_gen, MethodDef meth,
29 PEAPI.CILInstructions cil)
31 operand.Resolve (code_gen);
32 cil.FieldInst (op, operand.PeapiField);