Examples of PutConstInstr


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

        Node constNode = constDeclNode.getConstNode();

        if (constNode == null) {
            // SSS FIXME: Shouldn't we be adding a put const instr. here?
            s.getNearestModule().setConstantValue(constDeclNode.getName(), val);
            s.getNearestModule().getRootMethod().addInstr(new PutConstInstr(s.getNearestModule(), constDeclNode.getName(), val));
        } else if (constNode.getNodeType() == NodeType.COLON2NODE) {
            Operand module = build(((Colon2Node) constNode).getLeftNode(), s);
            s.addInstr(new PutConstInstr(module, constDeclNode.getName(), val));
        } else { // colon3, assign in Object
            s.addInstr(new PutConstInstr(getSelf(s), constDeclNode.getName(), val));
        }

        return val;
    }
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.