// ForStmt
        public override bool Walk(ForStmt node)
        {
            // Walk the expression
            node.list.Walk(this);

            BitArray opte = new BitArray(bits);
            BitArray exit = new BitArray(bits.Length, true);

            PushLoop(exit);

            // Define the lhs
            node.lhs.Walk(fdef);
            // Walk the body
            node.body.Walk(this);

            PopLoop();

            bits.And(exit);

            if (node.elseStmt != null)
            {
                // Flow the else
                BitArray save = bits;
                bits = opte;
                node.elseStmt.Walk(this);
                // Restore the bits
                bits = save;
            }

            // Intersect
            bits.And(opte);

            return(false);
        }
Exemple #2
0
 // ForStmt
 public override bool Walk(ForStmt node)
 {
     node.lhs.Walk(define);
     // Add locals
     Debug.Assert(current != null);
     current.tempsCount += node.LocalSlots;
     return(true);
 }
 public virtual void PostWalk(ForStmt node)
 {
 }
 // ForStmt
 public virtual bool Walk(ForStmt node)
 {
     return(false);
 }
 // ForStmt
 public virtual bool Walk(ForStmt node)
 {
     return(true);
 }