Package org.jruby.compiler.ir.representations

Examples of org.jruby.compiler.ir.representations.CFG


    public void run(IRScope s) {
        if (!(s instanceof IRMethod)) return;

        IRMethod m = (IRMethod) s;
        //        if (m.requiresBinding()) {
        CFG c = m.getCFG();
        BindingStorePlacementProblem fsp = new BindingStorePlacementProblem();
        fsp.setup(c);
        fsp.compute_MOP_Solution();
        fsp.addStoreAndBindingAllocInstructions();
View Full Code Here


    public void run(IRScope s)
    {
        if (s instanceof IRExecutionScope) {
//            System.out.println("Starting build of dom tree for " + s);
            CFG c = ((IRExecutionScope)s).getCFG();
            try {
                c.buildDominatorTree();
            } catch (Exception e) {
                System.out.println("Caught exception building dom tree for " + c.getGraph());
                System.out.println("\nInstructions:\n" + c.toStringInstrs());
            }
        }
    }
View Full Code Here

    }

    public void run(IRScope s) {
        if (!(s instanceof IRMethod)) return;

        CFG c = ((IRMethod) s).getCFG();
        LiveVariablesProblem lvp = (LiveVariablesProblem) c.getDataFlowSolution(DataFlowConstants.LVP_NAME);
       
        if (lvp == null) {
            lvp = new LiveVariablesProblem();
            lvp.setup(c);
            lvp.compute_MOP_Solution();
            c.setDataFlowSolution(lvp.getName(), lvp);
        }
       
        lvp.markDeadInstructions();
    }
View Full Code Here

    public boolean canCaptureCallersBinding() {
        return canCaptureCallersBinding;
    }

    public CFG buildCFG() {
        cfg = new CFG(this);
        cfg.build(instructions);
        return cfg;
    }
View Full Code Here

            // FIXME: name should probably not be "" ever.
            String realName = name == null || "".equals(name) ? method.getName() : name;
            System.out.println("Executing '" + realName + "'");
        }

        CFG c = method.getCFG();
        if (c == null) {
            // The base IR may not have been processed yet because the method is added dynamically.
            method.prepareForInterpretation();
            c = method.getCFG();
        }
        if (Interpreter.isDebug() && displayedCFG == false) {
            System.out.println("CFG:\n" + c.getGraph());
            System.out.println("\nInstructions:\n" + c.toStringInstrs());
            displayedCFG = true;
        }

        return Interpreter.INTERPRET_METHOD(context, c, interp, name, getImplementationClass(), false);
    }
View Full Code Here

TOP

Related Classes of org.jruby.compiler.ir.representations.CFG

Copyright © 2018 www.massapicom. 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.