Examples of JRubyClassLoader


Examples of org.jruby.util.JRubyClassLoader

        this.syncObject = classLoader;
       
        if (classLoader instanceof JRubyClassLoader) {
            this.classLoader = (JRubyClassLoader)classLoader;
        } else {
            this.classLoader = new JRubyClassLoader(classLoader);
        }
    }
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

     */
    public IRubyObject runNormally(Node scriptNode) {
        Script script = null;
        boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();
        if (compile || config.isShowBytecode()) {
            script = tryCompile(scriptNode, null, new JRubyClassLoader(getJRubyClassLoader()), config.isShowBytecode());
        }

        if (script != null) {
            if (config.isShowBytecode()) {
                return getNil();
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

     *
     * @param node The node to attempt to compiled
     * @return an instance of the successfully-compiled Script, or null.
     */
    public Script tryCompile(Node node) {
        return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), false);
    }
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

     * @param node The node to attempt to compiled
     * @param inspector The ASTInspector to use for making optimization decisions
     * @return an instance of the successfully-compiled Script, or null.
     */
    public Script tryCompile(Node node, ASTInspector inspector) {
        return tryCompile(node, null, new JRubyClassLoader(getJRubyClassLoader()), inspector, false);
    }
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

    }

    public synchronized JRubyClassLoader getJRubyClassLoader() {
        // FIXME: Get rid of laziness and handle restricted access elsewhere
        if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {
            jrubyClassLoader = new JRubyClassLoader(config.getLoader());
        }
       
        return jrubyClassLoader;
    }
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

            }

            // script was not found in cache above, so proceed to compile
            Node scriptNode = parseFile(readStream, filename, null);
            if (script == null) {
                script = tryCompile(scriptNode, className, new JRubyClassLoader(jrubyClassLoader), false);
            }

            if (script == null) {
                failForcedCompile(scriptNode);
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

        boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();
        if (compile || config.isShowBytecode()) {
            // IR JIT does not handle all scripts yet, so let those that fail run in interpreter instead
            // FIXME: restore error once JIT should handle everything
            try {
                scriptAndCode = tryCompile(scriptNode, new JRubyClassLoader(getJRubyClassLoader()));
                if (scriptAndCode != null && Options.JIT_LOGGING.load()) {
                    LOG.info("done compiling target script: " + scriptNode.getPosition().getFile());
                }
            } catch (Exception e) {
                if (Options.JIT_LOGGING.load()) {
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

     *
     * @param node The node to attempt to compiled
     * @return an instance of the successfully-compiled Script, or null.
     */
    public Script tryCompile(Node node) {
        return tryCompile(node, new JRubyClassLoader(getJRubyClassLoader())).script();
    }
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

     * @return
     */
    public synchronized JRubyClassLoader getJRubyClassLoader() {
        // FIXME: Get rid of laziness and handle restricted access elsewhere
        if (!Ruby.isSecurityRestricted() && jrubyClassLoader == null) {
            jrubyClassLoader = new JRubyClassLoader(config.getLoader());

            // if jit code cache is used, we need to add the cache directory to the classpath
            // so the previously generated class files can be reused.
            if( config.JIT_CODE_CACHE != null && !config.JIT_CODE_CACHE.trim().isEmpty() ) {
                File file = new File( config.JIT_CODE_CACHE );
View Full Code Here

Examples of org.jruby.util.JRubyClassLoader

            }

            // script was not found in cache above, so proceed to compile
            Node scriptNode = parseFile(readStream, filename, null);
            if (script == null) {
                scriptAndCode = tryCompile(scriptNode, new JRubyClassLoader(jrubyClassLoader));
                if (scriptAndCode != null) script = scriptAndCode.script();
            }

            if (script == null) {
                failForcedCompile(scriptNode);
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.