// <summary> // Creates a new flow branching which is contained in `parent'. // You should only pass non-null for the `block' argument if this block // introduces any new variables - in this case, we need to create a new // usage vector with a different size than our parent's one. // </summary> protected FlowBranching(FlowBranching parent, BranchingType type, SiblingType stype, Block block, Location loc) { Parent = parent; Block = block; Location = loc; Type = type; id = ++next_id; UsageVector vector; if (Block != null) { UsageVector parent_vector = parent != null ? parent.CurrentUsageVector : null; vector = new UsageVector (stype, parent_vector, Block, loc, Block.AssignableSlots); } else { vector = new UsageVector (stype, Parent.CurrentUsageVector, null, loc); } AddSibling (vector); }
public FlowBranchingContinuable (FlowBranching parent, BranchingType type, SiblingType stype, Block block, Location loc) : base (parent, type, stype, block, loc) { }
// <summary> // Creates a sibling of the current usage vector. // </summary> public virtual void CreateSibling (Block block, SiblingType type) { UsageVector vector = new UsageVector ( type, Parent.CurrentUsageVector, block, Location); AddSibling (vector); Report.Debug (1, " CREATED SIBLING", CurrentUsageVector); }
private UsageVector (MyBitVector locals, bool is_unreachable, Block block, Location loc) { this.Type = SiblingType.Block; this.Location = loc; this.Block = block; this.is_unreachable = is_unreachable; this.locals = locals; id = ++next_id; }
public UsageVector (SiblingType type, UsageVector parent, Block block, Location loc) : this (type, parent, block, loc, parent.CountLocals) { }
// // Normally, you should not use any of these constructors. // public UsageVector (SiblingType type, UsageVector parent, Block block, Location loc, int num_locals) { this.Type = type; this.Block = block; this.Location = loc; this.InheritsFrom = parent; this.CountLocals = num_locals; locals = num_locals == 0 ? MyBitVector.Empty : new MyBitVector (parent == null ? MyBitVector.Empty : parent.locals, num_locals); if (parent != null) is_unreachable = parent.is_unreachable; id = ++next_id; }