Package org.jruby.ir.operands

Examples of org.jruby.ir.operands.WrappedIRClosure


    public BuildLambdaInstr(Variable lambda, IRClosure lambdaBody, ISourcePosition position) {
        super(Operation.LAMBDA);
    
        this.result = lambda;
        this.operands = new Operand[] { new WrappedIRClosure(lambdaBody) };
        this.position = position;
    }
View Full Code Here


        Operand closureRetVal = forNode.getBodyNode() == null ? manager.getNil() : forBuilder.build(forNode.getBodyNode(), closure);
        if (closureRetVal != U_NIL) { // can be null if the node is an if node with returns in both branches.
            closure.addInstr(new ReturnInstr(closureRetVal));
        }

        return new WrappedIRClosure(closure);
    }
View Full Code Here

        Operand closureRetVal = iterNode.getBodyNode() == null ? manager.getNil() : closureBuilder.build(iterNode.getBodyNode(), closure);
        if (closureRetVal != U_NIL) { // can be U_NIL if the node is an if node with returns in both branches.
            closure.addInstr(new ReturnInstr(closureRetVal));
        }

        return new WrappedIRClosure(closure);
    }
View Full Code Here

        if (beBlocks == null) return;

        for (IRClosure b: beBlocks) {
            // SSS FIXME: Should I piggyback on WrappedIRClosure.retrieve or just copy that code here?
            b.prepareForInterpretation(false);
            Block blk = (Block)(new WrappedIRClosure(b)).retrieve(context, self, context.getCurrentScope(), temp);
            blk.yield(context, null);
        }
    }
View Full Code Here

TOP

Related Classes of org.jruby.ir.operands.WrappedIRClosure

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.