blob: aa4d8390d804cc80a9ebd0958d4ccf6fe86a0651 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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);
}
}
}
|