Examples of ExceptionRegionStartMarkerInstr


Examples of org.jruby.compiler.ir.instructions.ExceptionRegionStartMarkerInstr

        Label rEndLabel   = ebi.end;
        List<Label> rescueLabels = new ArrayList<Label>() { };

        // Protected region code
        m.addInstr(new LABEL_Instr(rBeginLabel));
        m.addInstr(new ExceptionRegionStartMarkerInstr(rBeginLabel, rEndLabel, rescueLabels));
        Object v1 = protectedCode.run(protectedCodeArgs); // YIELD: Run the protected code block
        m.addInstr(new SET_RETADDR_Instr(ebi.returnAddr, rEndLabel));

        _ensureBlockStack.pop();
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.ExceptionRegionStartMarkerInstr

        Label rEndLabel = m.getNewLabel();
        List<Label> rescueLabels = new ArrayList<Label>() { };

        // Protected region code
        m.addInstr(new LABEL_Instr(rBeginLabel));
        m.addInstr(new ExceptionRegionStartMarkerInstr(rBeginLabel, rEndLabel, rescueLabels));
        Object v1 = protectedCode.run(protectedCodeArgs); // YIELD: Run the protected code block
        m.addInstr(new CopyInstr(rv, (Operand)v1));
        m.addInstr(new JumpInstr(rEndLabel));
        m.addInstr(new ExceptionRegionEndMarkerInstr());
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.ExceptionRegionStartMarkerInstr

        Label rEndLabel   = ebi.end;
        List<Label> rescueLabels = new ArrayList<Label>() { };

        // Start of region
        m.addInstr(new LABEL_Instr(rBeginLabel));
        m.addInstr(new ExceptionRegionStartMarkerInstr(rBeginLabel, rEndLabel, rescueLabels));

        // Generate IR for Code being protected
        Operand  rv = (bodyNode instanceof RescueNode) ? buildRescueInternal(bodyNode, m, rBeginLabel) : build(bodyNode, m);

        // End of protected region
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.ExceptionRegionStartMarkerInstr

        if (availableBeginLabel == null)
            m.addInstr(new LABEL_Instr(rBeginLabel));

        // Placeholder rescue instruction that tells rest of the compiler passes the boundaries of the rescue block.
        List<Label> rescueBlockLabels = new ArrayList<Label>();
        ExceptionRegionStartMarkerInstr rbStartInstr = new ExceptionRegionStartMarkerInstr(rBeginLabel, rEndLabel, rescueBlockLabels);
        m.addInstr(rbStartInstr);

        // Body
        Operand tmp = Nil.NIL;  // default return value if for some strange reason, we neither have the body node or the else node!
        Variable rv = m.getNewTemporaryVariable();
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.ExceptionRegionStartMarkerInstr

            }

            if (i instanceof ExceptionRegionStartMarkerInstr) {
// SSS: Do we need this anymore?
//                currBB.addInstr(i);
                ExceptionRegionStartMarkerInstr rbsmi = (ExceptionRegionStartMarkerInstr)i;
                ExceptionRegion rr = new ExceptionRegion(rbsmi._rescueBlockLabels);
                rr.addBB(currBB);
                allExceptionRegions.add(rr);

                if (nestedExceptionRegions.empty())
View Full Code Here

Examples of org.jruby.ir.instructions.ExceptionRegionStartMarkerInstr

            }

            if (i instanceof ExceptionRegionStartMarkerInstr) {
// SSS: Do we need this anymore?
//                currBB.addInstr(i);
                ExceptionRegionStartMarkerInstr ersmi = (ExceptionRegionStartMarkerInstr) i;
                ExceptionRegion rr = new ExceptionRegion(ersmi.firstRescueBlockLabel, ersmi.ensureBlockLabel);
                rr.addBB(currBB);
                allExceptionRegions.add(rr);

                if (nestedExceptionRegions.empty()) {
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.