예제 #1
0
        public ControlFlowGraph(ThreeAddressCodeVisitor code)
        {
            var code_blocks = new Block.Block(code);

            this.blocks = code_blocks.GenerateBlocks();
            cfg         = new Graph(this.blocks.Count);
            GenerateCFG();
        }
예제 #2
0
        public List <LinkedList <ThreeCode> > Apply(ThreeAddressCodeVisitor visit)
        {
            Block.Block bl = new Block.Block(visit);
            List <LinkedList <ThreeCode> > res = bl.GenerateBlocks();

            Apply(ref res);

            return(res);
        }
        public List <LinkedList <ThreeCode> > Apply(ThreeAddressCodeVisitor visit)
        {
            Block.Block bl = new Block.Block(visit);
            List <LinkedList <ThreeCode> > res = bl.GenerateBlocks();

            for (int i = 0; i < res.Count; i++)
            {
                Apply(res[i]);
            }

            return(res);
        }