public EHBlockNode AddNewFault() { EHBlockNode node = NewNode(); faultNodes.Add(node); return(node); }
private EHBlockNode NewNode() { EHBlockNode node = new EHBlockNode(); node.EncloseBlock = this; return(node); }
public EHBlockNode AddNewFilter() { EHBlockNode node = NewNode(); filterNodes.Add(node); return(node); }
public EHBlockNode AddNewFinally() { EHBlockNode node = NewNode(); finallyNodes.Add(node); return(node); }
public EHBlockNode AddNewCatch() { EHBlockNode node = NewNode(); catchNodes.Add(node); return(node); }
public EHBlockNode Find(long label) { if (scopeEnd > scopeStart && (label < scopeStart || label > scopeEnd)) { return(null); } foreach (EHBlock block in ehBlocks) { EHBlockNode n = block.Find(label); if (n != null) { return(n); } } return(this); }
public EHBlockNode Find(long label) { EHBlockNode n = tryNode.Find(label); if (n != null) { return(n); } foreach (EHBlockNode node in catchNodes) { n = tryNode.Find(label); if (n != null) { return(n); } } foreach (EHBlockNode node in filterNodes) { n = tryNode.Find(label); if (n != null) { return(n); } } foreach (EHBlockNode node in faultNodes) { n = tryNode.Find(label); if (n != null) { return(n); } } foreach (EHBlockNode node in finallyNodes) { n = tryNode.Find(label); if (n != null) { return(n); } } return(null); }
private string AdjustGoto(long srcLv, long _destLv, bool isDecompile) { string label = null; long destLv = _destLv; for (;;) { int ix = ilLines.Keys.IndexOf(destLv); IlIns il = ilLines.Values[ix]; OpCode opc = IlOpcodes.Get(il.Opcode); if (opc == OpCodes.Br || opc == OpCodes.Br_S) { label = il.Value; destLv = IlIns.LabelToValue(il.Value); } else { break; } } EHBlockNode ns = rootEHNode.Find(srcLv); EHBlockNode nd = ns.Find(destLv); if (nd != null && ns != nd) { EHBlockNode d = nd; while (d != null && ns != d.EncloseBlock.EncloseNode) { d = d.EncloseBlock.EncloseNode; } return("IL_" + d.ScopeStart.ToString("X6")); } if (label != null) { return(label); } return(null); }