示例#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;
 }