In ilasm/tests:
[mono.git] / mcs / ilasm / codegen / TypeInstr.cs
1 //
2 // Mono.ILASM.TypeInstr
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10
11 using System;
12
13 namespace Mono.ILASM {
14
15         public class TypeInstr : IInstr {
16
17                 private PEAPI.TypeOp op;
18                 private ITypeRef operand;
19
20                 public TypeInstr (PEAPI.TypeOp op, ITypeRef operand, Location loc)
21                         : base (loc)
22                 {
23                         this.op = op;
24                         this.operand = operand;
25                 }
26
27                 public override void Emit (CodeGen code_gen, MethodDef meth, 
28                                            PEAPI.CILInstructions cil)
29                 {
30                         operand.Resolve (code_gen);
31                         cil.TypeInst (op, operand.PeapiType);
32                 }
33
34         }
35
36 }
37