Examples of ReceiveRestArgInstr18


Examples of org.jruby.ir.instructions.ruby18.ReceiveRestArgInstr18

            if (isSplat) s.addInstr(new RestArgMultipleAsgnInstr(v, argsArray, argIndex));
            else s.addInstr(new ReqdArgMultipleAsgnInstr(v, argsArray, argIndex));
        } else {
            // argsArray can be null when the first node in the args-node-ast is a multiple-assignment
            // For example, for-nodes
            s.addInstr(isClosureArg ? new ReceiveClosureInstr(v) : (isSplat ? new ReceiveRestArgInstr18(v, argIndex) : new ReceivePreReqdArgInstr(v, argIndex)));
        }
    }
View Full Code Here

Examples of org.jruby.ir.instructions.ruby18.ReceiveRestArgInstr18

            // For this code, there is no argument name available from the ruby code.
            // So, we generate an implicit arg name
            String argName = argsNode.getRestArgNode().getName();
            if (s instanceof IRMethod) ((IRMethod)s).addArgDesc("rest", argName);
            argName = (argName.equals("")) ? "%_arg_array" : argName;
            s.addInstr(new ReceiveRestArgInstr18(s.getLocalVariable(argName, 0), argIndex));
        }

        // Receive block
        receiveMethodClosureArg(argsNode, s);
    }
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.