Examples of compileRoot()


Examples of org.jruby.compiler.ASTCompiler.compileRoot()

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(node);
           
        StandardASMCompiler asmCompiler = new StandardASMCompiler(classname, filename);
        ASTCompiler compiler = new ASTCompiler();
        compiler.compileRoot(node, asmCompiler, inspector);
        byte[] bts = asmCompiler.getClassByteArray();

        IRubyObject compiledScript = ((RubyModule)recv).fastGetConstant("CompiledScript").callMethod(recv.getRuntime().getCurrentContext(),"new");
        compiledScript.callMethod(recv.getRuntime().getCurrentContext(), "name=", recv.getRuntime().newString(filename));
        compiledScript.callMethod(recv.getRuntime().getCurrentContext(), "class_name=", recv.getRuntime().newString(classname));
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            inspector.inspect(node);

            StandardASMCompiler asmCompiler = new StandardASMCompiler(classname, filename);
            ASTCompiler compiler = new ASTCompiler();
            if (config.isShowBytecode()) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }
            script = (Script)asmCompiler.loadClass(classLoader).newInstance();
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            ASTCompiler compiler = new ASTCompiler();
            if (config.isShowBytecode()) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }
            script = (Script)asmCompiler.loadClass(classLoader).newInstance();

            if (config.isJitLogging()) {
                System.err.println("compiled: " + node.getPosition().getFile());
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(node);
           
        StandardASMCompiler asmCompiler = new StandardASMCompiler(classname, filename);
        ASTCompiler compiler = recv.getRuntime().getInstanceConfig().newCompiler();
        compiler.compileRoot(node, asmCompiler, inspector);
        byte[] bts = asmCompiler.getClassByteArray();

        IRubyObject compiledScript = ((RubyModule)recv).fastGetConstant("CompiledScript").callMethod(recv.getRuntime().getCurrentContext(),"new");
        compiledScript.callMethod(recv.getRuntime().getCurrentContext(), "name=", recv.getRuntime().newString(filename));
        compiledScript.callMethod(recv.getRuntime().getCurrentContext(), "class_name=", recv.getRuntime().newString(classname));
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            } else {
                asmCompiler = new StandardASMCompiler(classname, filename);
            }
            ASTCompiler compiler = config.newCompiler();
            if (dump) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            ASTCompiler compiler = config.newCompiler();
            if (dump) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }

            if (RubyInstanceConfig.JIT_CODE_CACHE != null && cachedClassName != null) {
                // save script off to disk
                String pathName = cachedClassName.replace('.', '/');
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            } else {
                asmCompiler = new StandardASMCompiler(classname, filename);
            }
            ASTCompiler compiler = config.newCompiler();
            if (dump) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }
View Full Code Here

Examples of org.jruby.compiler.ASTCompiler.compileRoot()

            ASTCompiler compiler = config.newCompiler();
            if (dump) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
                asmCompiler.dumpClass(System.out);
            } else {
                compiler.compileRoot(node, asmCompiler, inspector, true, false);
            }

            if (RubyInstanceConfig.JIT_CODE_CACHE != null && cachedClassName != null) {
                // save script off to disk
                String pathName = cachedClassName.replace('.', '/');
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.