Package org.jruby.compiler.ir

Examples of org.jruby.compiler.ir.IRExecutionScope


    }

    public void addStoreAndBindingAllocInstructions() {
        BindingStorePlacementProblem bsp = (BindingStorePlacementProblem) _prob;
        CFG cfg = bsp.getCFG();
        IRExecutionScope s = cfg.getScope();
        ListIterator<Instr> instrs = _bb.getInstrs().listIterator();
        Set<Variable> dirtyVars = new HashSet<Variable>(_inDirtyVars);
        boolean bindingAllocated = _inBindingAllocated;

        // If this is the exit BB, we need a binding story on exit only for vars that are both:
View Full Code Here


        return "";
    }

    public void addLoads() {
        BindingLoadPlacementProblem blp = (BindingLoadPlacementProblem) _prob;
        IRExecutionScope s = blp.getCFG().getScope();
        List<Instr> instrs = _bb.getInstrs();
        ListIterator<Instr> it = instrs.listIterator(instrs.size());
        Set<Variable> reqdLoads = new HashSet<Variable>(_inReqdLoads);
        while (it.hasPrevious()) {
            Instr i = it.previous();
View Full Code Here

    }

    public Variable getRenamedVariable(Variable v) {
        Variable newVar = this.varRenameMap.get(v);
        if (newVar == null) {
        IRExecutionScope m = this.callerCFG.getScope();
            newVar = m.getNewInlineVariable();
            if (v instanceof LocalVariable) {
                // Frame load/store placement dataflow pass (and possible other passes later on) exploit
                // information whether a variable is a temporary or a local/self variable.
                // So, variable renaming for inlining has to preserve this information.
                newVar = m.getLocalVariable(newVar.getName());
            }
            this.varRenameMap.put(v, newVar);
        }
        return newVar;
    }
View Full Code Here

    // Should we run this pass on the current scope before running it on nested scopes?
    public boolean isPreOrder() { return false; }

    public void run(IRScope s) {
        if (s instanceof IRExecutionScope) {
            IRExecutionScope es = (IRExecutionScope)s;

            // Run this pass on nested closures first!
            // This let us compute execute scope flags for a method based on what all nested closures do
            List<IRClosure> closures = es.getClosures();
            for (IRClosure c: closures)
                run(c);

            // Now, run on current scope
            runLocalOpts(es);

            // Only after running local opts, compute various execution scope flags
            es.computeExecutionScopeFlags();
        }
    }
View Full Code Here

TOP

Related Classes of org.jruby.compiler.ir.IRExecutionScope

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.