public static BlockWithLabels <Label> BuildBlocks(Label entry, SubroutineBuilder <Label> subroutineBuilder) { var blockBuilder = new BlockBuilder <Label> (subroutineBuilder); blockBuilder.TraceAggregateSequentally(entry); if (blockBuilder.current_block == null) { return(null); } SubroutineBase <Label> subroutine = blockBuilder.CurrentSubroutine; subroutine.AddSuccessor(blockBuilder.current_block, EdgeTag.FallThroughReturn, subroutine.Exit); subroutine.AddReturnBlock(blockBuilder.current_block); return(blockBuilder.current_block); }
private BlockBuilder(SubroutineBuilder <Label> builder) { this.builder = builder; }
public BlockStartGatherer(SubroutineBuilder <Label> parent) { this.parent = parent; }