// <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); }
// <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; }
// <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); }
public FlowBranchingIterator StartFlowBranching(StateMachineInitializer iterator, FlowBranching parent) { FlowBranchingIterator branching = new FlowBranchingIterator(parent, iterator); current_flow_branching = branching; return(branching); }