public LabelInfo(string name, int pos) { Name = name; Pos = pos; Label = null; UseOffset = false; }
public override void Emit(CodeGen code_gen, MethodDef meth, PEAPI.CILInstructions cil) { int count = 0; PEAPI.CILLabel[] label_array; if (label_list != null) { label_array = new PEAPI.CILLabel[label_list.Count]; foreach (object lab in label_list) { if (lab is LabelInfo) { label_array[count++] = ((LabelInfo)lab).Label; } else { throw new InternalErrorException("offsets in switch statements."); } } } else { label_array = new PEAPI.CILLabel [0]; } cil.Switch(label_array); }
public LabelInfo (string name, int pos) { Name = name; Pos = pos; Label = null; UseOffset = false; }
public LabelInfo(string name, int pos, uint offset) { Name = name; Pos = pos; Offset = offset; Label = null; UseOffset = true; }
public LabelInfo (string name, int pos, uint offset) { Name = name; Pos = pos; Offset = offset; Label = null; UseOffset = true; }
public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method) { PEAPI.CILLabel from = handler_block.GetFromLabel(code_gen, method); PEAPI.CILLabel to = handler_block.GetToLabel(code_gen, method); PEAPI.Finally phinally = new PEAPI.Finally(from, to); return(phinally); }
public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method) { PEAPI.CILLabel from = handler_block.GetFromLabel(code_gen, method); PEAPI.CILLabel to = handler_block.GetToLabel(code_gen, method); PEAPI.Fault fault = new PEAPI.Fault(from, to); return(fault); }
public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method) { PEAPI.CILLabel label = this_block.GetFromLabel(code_gen, method); PEAPI.CILLabel from = handler_block.GetFromLabel(code_gen, method); PEAPI.CILLabel to = handler_block.GetToLabel(code_gen, method); PEAPI.Filter filter = new PEAPI.Filter(label, from, to); return(filter); }
public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method) { PEAPI.CILLabel from = handler_block.GetFromLabel(code_gen, method); PEAPI.CILLabel to = handler_block.GetToLabel(code_gen, method); PEAPI.Catch katch; type_ref.Resolve(code_gen); katch = new PEAPI.Catch(type_ref.PeapiType, from, to); return(katch); }
public override void Emit(CodeGen code_gen, MethodDef meth, PEAPI.CILInstructions cil) { PEAPI.CILLabel from = block.GetFromLabel(code_gen, meth); PEAPI.CILLabel to = block.GetToLabel(code_gen, meth); PEAPI.TryBlock try_block = new PEAPI.TryBlock(from, to); foreach (ISehClause clause in clause_list) { try_block.AddHandler(clause.Resolve(code_gen, meth)); } cil.AddTryBlock(try_block); }
public override void Emit (CodeGen code_gen, MethodDef meth, PEAPI.CILInstructions cil) { int count = 0; PEAPI.CILLabel[] label_array; if (label_list != null) { label_array = new PEAPI.CILLabel[label_list.Count]; foreach (object lab in label_list) { if (lab is LabelInfo) { label_array[count++] = ((LabelInfo)lab).Label; } else { throw new InternalErrorException ("offsets in switch statements."); } } } else { label_array = new PEAPI.CILLabel [0]; } cil.Switch (label_array); }
public void Define(PEAPI.CILLabel label) { Label = label; }
public void Define (PEAPI.CILLabel label) { Label = label; }