Package org.jruby.ir.instructions

Examples of org.jruby.ir.instructions.CopyInstr


            case DSTRNODE: {
                Operand v = super.buildVersionSpecificGetDefinitionIR(node, s);
                Label doneLabel = s.getNewLabel();
                Variable tmpVar = getValueInTemporaryVariable(s, v);
                s.addInstr(BNEInstr.create(tmpVar, manager.getNil(), doneLabel));
                s.addInstr(new CopyInstr(tmpVar, new StringLiteral("expression")));
                s.addInstr(new LabelInstr(doneLabel));
                return tmpVar;
            }
            case NOTNODE: {
                Operand v = buildGetDefinitionBase(((NotNode)node).getConditionNode(), s);
                Label doneLabel = s.getNewLabel();
                Variable tmpVar = getValueInTemporaryVariable(s, v);
                s.addInstr(BEQInstr.create(tmpVar, manager.getNil(), doneLabel));
                s.addInstr(new CopyInstr(tmpVar, new StringLiteral("method")));
                s.addInstr(new LabelInstr(doneLabel));
                return tmpVar;
            }
            case NTHREFNODE: {
            // SSS FIXME: Is there a reason to do this all with low-level IR?
View Full Code Here


                        if (res.equals(val) && i.canBeDeleted(s)) {
                            i.markDead();
                            instrs.remove();
                        }
                    } else {
                        instrs.set(new CopyInstr(res, val));
                    }
                }
            } else if (res != null && val == null) {
                // If we didn't get a simplified value, remove any existing simplifications for the result
                // to get rid of RAW hazards!
View Full Code Here

        BasicBlock bb = cfg.getEntryBB();
        int index = 0;
        TemporaryVariable first = null;
        for (TemporaryVariable name : names) {
            if (first == null) {
                bb.getInstrs().add(index++, new CopyInstr(name, new Nil()));
                first = name;
            } else {
                bb.getInstrs().add(index++, new CopyInstr(name, first));
            }
        }

        // recurse
        for (IRScope childScope : cfg.getScope().getClosures()) {
View Full Code Here

TOP

Related Classes of org.jruby.ir.instructions.CopyInstr

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.