Ejemplo n.º 1
0
        // <summary>
        //   Ends a code branching.  Merges the state of locals and parameters
        //   from all the children of the ending branching.
        // </summary>
        public bool EndFlowBranching()
        {
            FlowBranching old = current_flow_branching;

            current_flow_branching = current_flow_branching.Parent;

            FlowBranching.UsageVector vector = current_flow_branching.MergeChild(old);
            return(vector.IsUnreachable);
        }
Ejemplo n.º 2
0
 // <summary>
 //   Kills the current code branching.  This throws away any changed state
 //   information and should only be used in case of an error.
 // </summary>
 // FIXME: this is evil
 public void KillFlowBranching()
 {
     current_flow_branching = current_flow_branching.Parent;
 }
Ejemplo n.º 3
0
 // <summary>
 //   Starts a new code branching.  This inherits the state of all local
 //   variables and parameters from the current branching.
 // </summary>
 public FlowBranching StartFlowBranching(FlowBranching.BranchingType type, Location loc)
 {
     current_flow_branching = FlowBranching.CreateBranching(CurrentBranching, type, null, loc);
     return(current_flow_branching);
 }
Ejemplo n.º 4
0
        public FlowBranchingIterator StartFlowBranching(StateMachineInitializer iterator, FlowBranching parent)
        {
            FlowBranchingIterator branching = new FlowBranchingIterator(parent, iterator);

            current_flow_branching = branching;
            return(branching);
        }