public ISeq <LeaveTryBasicBlock> LeaveTrys() { var acc = new Seq <LeaveTryBasicBlock>(); var visited = new Set <BasicBlock>(); Body.AccumLeaveTrys(visited, acc, 0); foreach (var h in Handlers) { h.AccumLeaveTrys(visited, acc, 0); } return(acc); }
public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { if (!visited.Contains(this)) { visited.Add(this); Target.AccumLeaveTrys(visited, acc, depth); } }
public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { if (!visited.Contains(this)) { visited.Add(this); // Remember, this basic block is for 'leaves' which don't acutally leave any try context, // in other words are just a fancy way of emptying the stack. Target.AccumLeaveTrys(visited, acc, depth); } }
public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { if (!visited.Contains(this)) { visited.Add(this); foreach (var bb in CaseTargets) { bb.AccumLeaveTrys(visited, acc, depth); } Fallthrough.AccumLeaveTrys(visited, acc, depth); } }
public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { if (!visited.Contains(this)) { visited.Add(this); depth -= HandlerPopCount; if (depth >= 0) { Target.AccumLeaveTrys(visited, acc, depth); } } }
public override void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { if (!visited.Contains(this)) { visited.Add(this); if (depth == 0) { // Only include leave's from the try we started from, not inner trys acc.Add(this); } else { depth -= HandlerPopCount; if (depth >= 0) { Target.AccumLeaveTrys(visited, acc, depth); } } } }
public void AccumLeaveTrys(IMSet <BasicBlock> visited, ISeq <LeaveTryBasicBlock> acc, int depth) { Body.AccumLeaveTrys(visited, acc, depth); }