diff options
Diffstat (limited to 'mcs/ilasm/codegen/FieldInstr.cs')
-rw-r--r-- | mcs/ilasm/codegen/FieldInstr.cs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mcs/ilasm/codegen/FieldInstr.cs b/mcs/ilasm/codegen/FieldInstr.cs new file mode 100644 index 00000000000..02bb5b69872 --- /dev/null +++ b/mcs/ilasm/codegen/FieldInstr.cs @@ -0,0 +1,40 @@ +// +// Mono.ILASM.FieldInstr +// +// Author(s): +// Jackson Harper (Jackson@LatitudeGeo.com) +// +// (C) 2003 Jackson Harper, All rights reserved +// + + +using System; + + +namespace Mono.ILASM { + + public class FieldInstr : IInstr { + + private PEAPI.FieldOp op; + private IFieldRef operand; + + public FieldInstr (PEAPI.FieldOp op, IFieldRef operand, Location loc) + : base (loc) + { + this.op = op; + this.operand = operand; + } + + public override void Emit (CodeGen code_gen, MethodDef meth, + PEAPI.CILInstructions cil) + { + operand.Resolve (code_gen); + cil.FieldInst (op, operand.PeapiField); + } + + } + +} + + + |