2010-04-01 Jb Evain <jbevain@novell.com>
[mcs.git] / ilasm / codegen / LdstrInstr.cs
blobaa4d8390d804cc80a9ebd0958d4ccf6fe86a0651
1 //
2 // Mono.ILASM.LdstrInstr
3 //
4 // Author(s):
5 // Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
11 using System;
13 namespace Mono.ILASM {
15 public class LdstrInstr : IInstr {
17 private string operand;
18 private byte[] b_operand;
20 public LdstrInstr (string operand, Location loc)
21 : base (loc)
23 this.operand = operand;
26 public LdstrInstr (byte[] b_operand, Location loc)
27 : base (loc)
29 this.b_operand = b_operand;
32 public override void Emit (CodeGen code_gen, MethodDef meth,
33 PEAPI.CILInstructions cil)
35 if (operand != null)
36 cil.ldstr (operand);
37 else
38 cil.ldstr (b_operand);