2 // Mono.ILASM.SwitchInstr
5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
12 using System.Collections;
14 namespace Mono.ILASM {
16 public class SwitchInstr : IInstr {
18 private ArrayList label_list;
20 public SwitchInstr (ArrayList label_list)
22 this.label_list = label_list;
25 public void Emit (CodeGen code_gen, MethodDef meth, PEAPI.CILInstructions cil)
28 PEAPI.CILLabel[] label_array = new PEAPI.CILLabel[label_list.Count];
30 foreach (object lab in label_list) {
32 label_array[count++] = meth.GetLabelDef ((string) lab);
35 throw new NotImplementedException ("offsets in switch statements.");
39 cil.Switch (label_array);