private bool AllEndsAreThrow(ILogicalConstruct entry) { stackVariable4 = entry.get_FirstBlock().get_TheBlock(); stackVariable6 = new Code[1]; stackVariable6[0] = 119; if (!this.SubtreeEndsInInstructionCode(stackVariable4, stackVariable6)) { return(false); } return(true); }
private int GetWeight(ILogicalConstruct start, ILogicalConstruct end) { V_0 = 0; V_1 = end.get_FirstBlock(); V_2 = start.get_CFGBlocks().GetEnumerator(); try { while (V_2.MoveNext()) { if (!V_2.get_Current().get_CFGSuccessors().Contains(V_1)) { continue; } V_0 = V_0 + 1; } } finally { ((IDisposable)V_2).Dispose(); } return(V_0); }
public bool RemoveFromSuccessors(ILogicalConstruct successor) { return(this.successors.Remove(successor.get_FirstBlock())); }
public void AddToSuccessors(ILogicalConstruct successor) { dummyVar0 = this.successors.Add(successor.get_FirstBlock()); return; }
public static BlockLogicalConstruct GetNearestGuardedBlock(ILogicalConstruct start) { V_0 = start; while (V_0 != null && V_0 as ExceptionHandlingLogicalConstruct == null) { V_0 = (ILogicalConstruct)V_0.get_Parent(); } if (V_0 == null) { return(null); } if ((V_0 as ExceptionHandlingLogicalConstruct).get_Try().get_CFGBlocks().Contains(start.get_FirstBlock())) { return((V_0 as ExceptionHandlingLogicalConstruct).get_Try()); } if (V_0 as TryCatchFilterLogicalConstruct == null) { if (V_0 as TryFinallyLogicalConstruct != null) { return((V_0 as TryFinallyLogicalConstruct).get_Finally()); } if (V_0 as TryFaultLogicalConstruct == null) { throw new Exception("Unknown type of exception handling logical construct encountered."); } return((V_0 as TryFaultLogicalConstruct).get_Fault()); } V_1 = (V_0 as TryCatchFilterLogicalConstruct).get_Handlers(); V_2 = 0; while (V_2 < (int)V_1.Length) { V_3 = V_1[V_2]; if (V_3.get_HandlerType() == 1) { if ((V_3 as ExceptionHandlingBlockFilter).get_Filter().get_CFGBlocks().Contains(start.get_FirstBlock())) { return((V_3 as ExceptionHandlingBlockFilter).get_Filter()); } return((V_3 as ExceptionHandlingBlockFilter).get_Handler()); } if (V_3.get_HandlerType() == FilteringExceptionHandlerType.Catch) { return(V_3 as ExceptionHandlingBlockCatch); } V_2 = V_2 + 1; } return(null); }