示例#1
0
		public void VisitBranch(Branch branch)
		{
			if (!m_hasBranch)
			{
				m_hasBranch = true;
				Log.DebugLine(this, "branch at {0:X2}", branch.Untyped.Offset); 
			}
		}
		// might want a foreach test
		// make sure it works within a method (maybe if and handler)
		public void VisitBranch(Branch branch)
		{			
			if (branch.Untyped.OpCode.Code != Code.Leave && branch.Untyped.OpCode.Code != Code.Leave_S)
			{
				if (branch.Target.Index > branch.Index)
					DoAddBlock(branch.Index + 1, branch.Target.Index - branch.Index - 1);
				else
					DoAddBlock(branch.Target.Index, branch.Index - branch.Target.Index);
			}
		}
示例#3
0
		// What we want to do here is identify methods that are too complex to 
		// be readily understandable. So, we don't care about length since large 
		// straight-line methods are ugly but not hard to understand. Nor do we 
		// want to over-count switch statements because they are well structured 
		// and easy to understand.
		public void VisitBranch(Branch branch)
		{
			++m_count;
			Log.DebugLine(this, "found branch at {0:X2}", branch.Untyped.Offset); 
		}