Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ir.instructions.ruby18;
 
// Assign the 'index' argument to 'dest'.
public class ReceiveOptArgInstr18 extends ReceiveOptArgBase {
    public ReceiveOptArgInstr18(Variable resultint index) {
        super(resultindex);
    }
    @Override
    public Instr cloneForInlinedScope(InlinerInfo ii) {
        if (ii.canMapArgsStatically()) {
            return new CopyInstr(ii.getRenamedVariable(), ii.getArg());
        } else {
            return new OptArgMultipleAsgnInstr(ii.getRenamedVariable(), ii.getArgs(), );
        }
    }
    @Override
    public Instr cloneForBlockCloning(InlinerInfo ii) {
        return new ReceiveOptArgInstr18(ii.getRenamedVariable(), );
    }
    public Object receiveOptArg(IRubyObject[] args) {
        return ( < args.length ? args[] : .);
    }
    @Override
    public void visit(IRVisitor visitor) {
        visitor.ReceiveOptArgInstr18(this);
    }
New to GrepCode? Check out our FAQ X