diff options
author | Wade Berrier <wade@mono-cvs.ximian.com> | 2006-03-27 21:39:11 +0400 |
---|---|---|
committer | Wade Berrier <wade@mono-cvs.ximian.com> | 2006-03-27 21:39:11 +0400 |
commit | 33ab4bee8e165e330c6abd3385bb09357afd892a (patch) | |
tree | 7515ab171a26ef3e6eb0a1c9de8d4df5a15d400e /mcs/ilasm/codegen/LdstrInstr.cs | |
parent | a2109761ebb6d50e387002b45c0afdeade073faa (diff) | |
parent | 009188af4bc10445c44724d8bb9f2f467e8fcc53 (diff) |
pull from trunk (2 of 2)mono-1-1-13-6
svn path=/branches/mono-1-1-13/mcs/; revision=58604
Diffstat (limited to 'mcs/ilasm/codegen/LdstrInstr.cs')
-rw-r--r-- | mcs/ilasm/codegen/LdstrInstr.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mcs/ilasm/codegen/LdstrInstr.cs b/mcs/ilasm/codegen/LdstrInstr.cs new file mode 100644 index 00000000000..aa4d8390d80 --- /dev/null +++ b/mcs/ilasm/codegen/LdstrInstr.cs @@ -0,0 +1,44 @@ +// +// Mono.ILASM.LdstrInstr +// +// Author(s): +// Jackson Harper (Jackson@LatitudeGeo.com) +// +// (C) 2003 Jackson Harper, All rights reserved +// + + +using System; + +namespace Mono.ILASM { + + public class LdstrInstr : IInstr { + + private string operand; + private byte[] b_operand; + + public LdstrInstr (string operand, Location loc) + : base (loc) + { + this.operand = operand; + } + + public LdstrInstr (byte[] b_operand, Location loc) + : base (loc) + { + this.b_operand = b_operand; + } + + public override void Emit (CodeGen code_gen, MethodDef meth, + PEAPI.CILInstructions cil) + { + if (operand != null) + cil.ldstr (operand); + else + cil.ldstr (b_operand); + } + + } + +} + |