// TryStmt public override bool Walk(TryStmt node) { foreach (TryStmtHandler tsh in node.handlers) { if (tsh.target != null) { tsh.target.Walk(define); } } return(true); }
// TryStmt public override bool Walk(TryStmt node) { BitArray result = new BitArray(bits.Length, true); BitArray save = bits; bits = new BitArray(bits); // Flow the body node.body.Walk(this); result.And(bits); foreach (TryStmtHandler tsh in node.handlers) { // Restore to saved state bits.SetAll(false); bits.Or(save); // Flow the test if (tsh.test != null) { tsh.test.Walk(this); } // Define the target if (tsh.target != null) { tsh.target.Walk(fdef); } // Flow the body tsh.body.Walk(this); result.And(bits); } if (node.elseStmt != null) { bits.SetAll(false); bits.Or(save); node.elseStmt.Walk(this); result.And(bits); } bits = save; bits.SetAll(false); bits.Or(result); return(false); }
public override bool Walk(TryStmt node) { TryBlock tb = new TryBlock(node); tryBlocks.Push(tb); node.body.Walk(this); tb.state = TryBlock.State.Handler; foreach (TryStmtHandler handler in node.handlers) { handler.Walk(this); } ExceptionBlock eb = tryBlocks.Pop(); Debug.Assert((object)tb == (object)eb); if (node.elseStmt != null) { node.elseStmt.Walk(this); } return(false); }
public virtual void PostWalk(TryStmt node) { }
// TryStmt public virtual bool Walk(TryStmt node) { return(true); }
// TryStmt public virtual bool Walk(TryStmt node) { return(false); }
public TryBlock(TryStmt stmt, State state) : base(state) { this.stmt = stmt; }
public TryBlock(TryStmt stmt) : this(stmt, State.Try) { }