예제 #1
0
        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);
        }
예제 #2
0
 private BlockBuilder(SubroutineBuilder <Label> builder)
 {
     this.builder = builder;
 }
예제 #3
0
 public BlockStartGatherer(SubroutineBuilder <Label> parent)
 {
     this.parent = parent;
 }