Examples of basicBlocks()


Examples of javassist.bytecode.analysis.ControlFlow.basicBlocks()

public class DomTreeTest extends TestCase {
    private ClassPool pool = ClassPool.getDefault();

    public void testDomtree() throws Exception {
        ControlFlow cf = new ControlFlow(pool.get(DomTreeTest.class.getName()).getDeclaredMethod("test1"));
        Block[] blocks = cf.basicBlocks();
        // for (int i = 0; i < blocks.length; i++)
        //    System.out.println(i + ": " + blocks[i]);
        testBlock(blocks[0], new int[] {}, new int[] { 11, 6 } );
        testBlock(blocks[1], new int[] { 0 }, new int[] { 17, 11 } );
        testBlock(blocks[2], new int[] { 0, 6 }, new int[] { 19, 17 });
View Full Code Here

Examples of javassist.bytecode.analysis.ControlFlow.basicBlocks()

        }
    }

    public void testDomtree2() throws Exception {
        ControlFlow cf = new ControlFlow(pool.get(DomTreeTest.class.getName()).getDeclaredMethod("test2"));
        Block[] blocks = cf.basicBlocks();
        // for (int i = 0; i < blocks.length; i++)
        //    System.out.println(i + ": " + blocks[i]);
        testBlock(blocks[0], new int[] { 7 }, new int[] { 14, 7 } );
        testBlock(blocks[1], new int[] { 0 }, new int[] { 0, 12 } );
        testBlock(blocks[2], new int[] { 7 }, new int[] {});
View Full Code Here

Examples of javassist.bytecode.analysis.ControlFlow.basicBlocks()

        return i + 3;
    }

    public void testDomtree3() throws Exception {
        ControlFlow cf = new ControlFlow(pool.get(DomTreeTest.class.getName()).getDeclaredMethod("test3"));
        Block[] blocks = cf.basicBlocks();
        for (int i = 0; i < blocks.length; i++)
            System.out.println(blocks[i]);
    }

    public int test3(int i, int j) {
View Full Code Here

Examples of javassist.bytecode.analysis.ControlFlow.basicBlocks()

public class DomTreePrinter {
    public static void main(String[] args) throws Exception {
        ClassPool pool = ClassPool.getDefault();
        ControlFlow cf = new ControlFlow(pool.get(args[0]).getDeclaredMethod(args[1]));
        Block[] blocks = cf.basicBlocks();
        for (int i = 0; i < blocks.length; i++)
            System.out.println(i + ": " + blocks[i]);

        Node[] dom = cf.dominatorTree();
        for (int i = 0; i < dom.length; i++)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.