コード例 #1
0
            public PopTreeGraph Build(MethodDefinition method)
            {
                IControlFlowGraph cfg   = FlowGraphFactory.CreateControlFlowGraph(method);
                PopTreeGraph      graph = new PopTreeGraph(cfg);

                foreach (IInstructionBlock block in cfg.Blocks)
                {
                    PopTreeListBuilder build = new PopTreeListBuilder();

                    Instruction instruction  = block.FirstInstruction;
                    ArrayList   instructions = new ArrayList();
                    while (instruction != null)
                    {
                        instructions.Add(instruction);
                        instruction = instruction.Next;
                    }

                    PopTreeList list = build.Build(instructions);
                    if (list != null)
                    {
                        list.Block = block;
                        graph.Add(list);
                    }
                }
                return(graph);
            }
コード例 #2
0
 public void Add(PopTreeList trees)
 {
     PopTreeBlocks.Add(trees);
 }
コード例 #3
0
ファイル: Visitor.cs プロジェクト: Robby777/ambientsmell
 public void Add(PopTreeList trees)
 {
     PopTreeBlocks.Add(trees);
 }