Examples of DefineClassInstr


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

        String className = cpath.getName();
        Operand container = getContainerFromCPath(cpath, s);

        IRClass c = new IRClass(s, container, superClass, className, classNode.getScope());
        ClassMetaObject cmo = (ClassMetaObject) MetaObject.create(c);
        s.getNearestModule().getRootMethod().addInstr(new DefineClassInstr(cmo, c.superClass));
        s.getNearestModule().addClass(c);

        build(classNode.getBodyNode(), c.getRootMethod());

        return Nil.NIL;
View Full Code Here

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

        IRClass mc = new IRMetaClass(s, receiver, sclassNode.getScope());

        // Record the new class as being lexically defined in scope s
        s.getNearestModule().addClass(mc);
        ClassMetaObject cmo = (ClassMetaObject)MetaObject.create(mc);
        s.getNearestModule().getRootMethod().addInstr(new DefineClassInstr(cmo, mc.superClass));

        build(sclassNode.getBodyNode(), mc.getRootMethod());

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