Package org.jruby.compiler

Examples of org.jruby.compiler.ASTInspector.inspect()


        } else {
            classname = filename.replace('\\', '/').replaceAll(".rb", "").replaceAll("-","_dash_");
        }

        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();
View Full Code Here


        try {
            String filename = node.getPosition().getFile();
            String classname = JavaNameMangler.mangledFilenameForStartupClasspath(filename);

            ASTInspector inspector = new ASTInspector();
            inspector.inspect(node);

            StandardASMCompiler asmCompiler = new StandardASMCompiler(classname, filename);
            ASTCompiler compiler = new ASTCompiler();
            if (config.isShowBytecode()) {
                compiler.compileRoot(node, asmCompiler, inspector, false, false);
View Full Code Here

        } else {
            classname = filename.replace('\\', '/').replaceAll(".rb", "").replaceAll("-","_dash_");
        }

        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();
View Full Code Here

        }
    }

    private Script tryCompile(Node node, String cachedClassName, JRubyClassLoader classLoader, boolean dump) {
        ASTInspector inspector = new ASTInspector();
        inspector.inspect(node);

        return tryCompile(node, cachedClassName, classLoader, inspector, dump);
    }

    private Script tryCompile(Node node, String cachedClassName, JRubyClassLoader classLoader, ASTInspector inspector, boolean dump) {
View Full Code Here

        // we get these out ahead of time
        this.file = position.getFile();
        this.line = position.getLine();

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(body);
        inspector.inspect(argsNode);

        // This optimization is temporarily disabled because of the complications
        // arising from moving backref/lastline into scope and not being able
        // to accurately detect that situation.
View Full Code Here

        this.file = position.getFile();
        this.line = position.getLine();

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(body);
        inspector.inspect(argsNode);

        // This optimization is temporarily disabled because of the complications
        // arising from moving backref/lastline into scope and not being able
        // to accurately detect that situation.
//        if (inspector.hasClosure() || inspector.hasScopeAwareMethods() || staticScope.getNumberOfVariables() != 0) {
View Full Code Here

        // we get these out ahead of time
        this.file = position.getFile();
        this.line = position.getLine();

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(body);
        inspector.inspect(argsNode);

        // This optimization is temporarily disabled because of the complications
        // arising from moving backref/lastline into scope and not being able
        // to accurately detect that situation.
View Full Code Here

        this.file = position.getFile();
        this.line = position.getLine();

        ASTInspector inspector = new ASTInspector();
        inspector.inspect(body);
        inspector.inspect(argsNode);

        // This optimization is temporarily disabled because of the complications
        // arising from moving backref/lastline into scope and not being able
        // to accurately detect that situation.
//        if (inspector.hasClosure() || inspector.hasScopeAwareMethods() || staticScope.getNumberOfVariables() != 0) {
View Full Code Here

                    }
                }
            };
        }
        ASTInspector inspector = new ASTInspector();
        inspector.inspect(node);

        return tryCompile(node, cachedClassName, classLoader, inspector, dump);
    }

    private Script tryCompile(Node node, String cachedClassName, JRubyClassLoader classLoader, ASTInspector inspector, boolean dump) {
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.