Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/ilasm/codegen/LdstrInstr.cs')
-rw-r--r--mcs/ilasm/codegen/LdstrInstr.cs44
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);
+ }
+
+ }
+
+}
+