private int PatchPriorBeginOld(CFGBlock endBlock, int endOldIndex, out CFGBlock beginBlock) { for (int i = this == endBlock ? endOldIndex - 2 : Count - 1; i >= 0; i--) { int endOldI; if (IsBeginOld(i, out endOldI)) { this.overridingLabels [i] = BeginOldMask | (uint)endOldIndex; beginBlock = this; Subroutine.AddInferredOldMap(this.Index, i, endBlock, default(TypeNode)); return(i); } } IEnumerator <CFGBlock> enumerator = Subroutine.PredecessorBlocks(this).GetEnumerator(); if (!enumerator.MoveNext()) { throw new InvalidOperationException("missing begin_old"); } int result = PatchPriorBeginOld(endBlock, endOldIndex, enumerator.Current, out beginBlock); enumerator.MoveNext(); return(result); }
public void EndOldWithoutInstruction(TypeNode nextEndOldType) { int endOldIndex = this.overridingLabels.Count; CFGBlock beginBlock; this.overridingLabels.Add((uint)(EndOldMask | PatchPriorBeginOld(this, endOldIndex, out beginBlock))); Subroutine.AddInferredOldMap(this.Index, endOldIndex, beginBlock, nextEndOldType); }