Package org.jruby.compiler.ir.operands

Examples of org.jruby.compiler.ir.operands.Array


    public Operand getCallArg(int argIndex, boolean restOfArgArray) {
        if (restOfArgArray == false) {
            return getCallArg(argIndex);
        }
        else if (argIndex >= callArgs.length) {
            return new Array();
        }
        else {
            Operand[] tmp = new Operand[callArgs.length - argIndex];
            for (int j = argIndex; j < callArgs.length; j++)
                tmp[j-argIndex] = callArgs[j];

            return new Array(tmp);
        }
    }
View Full Code Here


    public Operand buildArray(Node node, IRScope m) {
        List<Operand> elts = new ArrayList<Operand>();
        for (Node e: node.childNodes())
            elts.add(build(e, m));

        return new Array(elts);
    }
View Full Code Here

        s.addInstr(new YieldInstr(ret, build(node.getArgsNode(), s)));
        return ret;
    }

    public Operand buildZArray(Node node, IRScope m) {
       return new Array();
    }
View Full Code Here

        Operand v2 = build(argsCatNode.getSecondNode(), s);
        args.add(new CompoundArray(v1, v2));
    }

    public void buildArgsPushArguments(List<Operand> args, ArgsPushNode argsPushNode, IRScope m) {
        Operand a = new Array(new Operand[]{ build(argsPushNode.getFirstNode(), m), build(argsPushNode.getSecondNode(), m) });
        args.add(a);
    }
View Full Code Here

                boolean restOfArgs = rcai.restOfArgArray;
                if (argIndex < yieldArgs.length) {
                    closureArg = yieldArgs[argIndex].cloneForInlining(ii);
                }
                else if (argIndex >= yieldArgs.length) {
                    closureArg = new Array();
                }
                else {
                    Operand[] tmp = new Operand[yieldArgs.length - argIndex];
                    for (int j = argIndex; j < yieldArgs.length; j++)
                        tmp[j-argIndex] = yieldArgs[j].cloneForInlining(ii);

                    closureArg = new Array(tmp);
                }

                // Replace the arg receive with a simple copy
                it.set(new CopyInstr(rcai.result, closureArg));
            }
View Full Code Here

TOP

Related Classes of org.jruby.compiler.ir.operands.Array

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.