Examples of RubyInternalCallInstr


Examples of org.jruby.compiler.ir.instructions.RubyInternalCallInstr

    // Is this a ruby-internals or a jruby-internals call?
    public Operand buildAlias(final AliasNode alias, IRScope s) {
        Operand newName = build(alias.getNewName(), s);
        Operand oldName = build(alias.getOldName(), s);
        Operand[] args = new Operand[] { newName, oldName };
        s.addInstr(new RubyInternalCallInstr(null, MethAddr.DEFINE_ALIAS, MetaObject.create(s), args));
        return Nil.NIL;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.RubyInternalCallInstr

    public Operand buildFor(ForNode forNode, IRExecutionScope m) {
        Variable ret      = m.getNewTemporaryVariable();
        Operand  receiver = build(forNode.getIterNode(), m);
        Operand  forBlock = buildForIter(forNode, m);    
        // SSS FIXME: Really?  Why the internal call?
        m.addInstr(new RubyInternalCallInstr(ret, MethAddr.FOR_EACH, receiver, NO_ARGS, forBlock));
        return ret;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.RubyInternalCallInstr

    public Operand buildSuper(SuperNode superNode, IRScope s) {
        List<Operand> args  = setupCallArgs(superNode.getArgsNode(), s);
        Operand       block = setupCallClosure(superNode.getIterNode(), s);
        Variable      ret   = s.getNewTemporaryVariable();
        s.addInstr(new RubyInternalCallInstr(ret, MethAddr.SUPER, getSelf(s),
                args.toArray(new Operand[args.size()]), block));
        return ret;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.RubyInternalCallInstr

    // SSS FIXME: Got a little lazy?  We could/should define a special instruction ALIAS_GLOBAL_VAR_Instr probably
    // Is this a ruby-internals or a jruby-internals call?
    public Operand buildVAlias(Node node, IRScope m) {
        VAliasNode valiasNode = (VAliasNode) node;
        Operand[] args = new Operand[] { new StringLiteral(valiasNode.getOldName()) };
        m.addInstr(new RubyInternalCallInstr(null, MethAddr.GVAR_ALIAS, new StringLiteral(valiasNode.getNewName()), args));
        return Nil.NIL;
    }
View Full Code Here

Examples of org.jruby.compiler.ir.instructions.RubyInternalCallInstr

    }

    public Operand buildZSuper(ZSuperNode zsuperNode, IRScope s) {
        Operand    block = setupCallClosure(zsuperNode.getIterNode(), s);
        Variable   ret   = s.getNewTemporaryVariable();
        s.addInstr(new RubyInternalCallInstr(ret, MethAddr.ZSUPER, getSelf(s),
                ((IRExecutionScope) s).getClosestMethodAncestor().getCallArgs(), block));
        return ret;
    }
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.