Examples of Script


Examples of org.jruby.ast.executable.Script

            // successfully got back a jitted method
            successCount.incrementAndGet();

            // finally, grab the script
            Script jitCompiledScript = sourceClass.newInstance();

            // add to the jitted methods set
            Set<Script> jittedMethods = ruby.get().getJittedMethods();
            jittedMethods.add(jitCompiledScript);
View Full Code Here

Examples of org.jruby.ast.executable.Script

            return state.library == null;
        }
       
        public void trySearch(SearchState state) throws RaiseException {
            // no library or extension found, try to load directly as a class
            Script script;
            String className = buildClassName(state.searchFile);
            int lastSlashIndex = className.lastIndexOf('/');
            if (lastSlashIndex > -1 && lastSlashIndex < className.length() - 1 && !Character.isJavaIdentifierStart(className.charAt(lastSlashIndex + 1))) {
                if (lastSlashIndex == -1) {
                    className = "_" + className;
View Full Code Here

Examples of org.jruby.ast.executable.Script

                clazz = jcl.defineClass(className, buf);
            }
           
            // if it's a compiled JRuby script, instantiate and run it
            if (Script.class.isAssignableFrom(clazz)) {
                Script script = (Script)clazz.newInstance();
                script.setFilename(resource.getName());
                script.load(runtime.getCurrentContext(), runtime.getTopSelf(), IRubyObject.NULL_ARRAY, Block.NULL_BLOCK);
            }
        } catch (IOException e) {
            throw runtime.newIOErrorFromException(e);
        } catch (InstantiationException ie) {
            if (runtime.getDebug().isTrue()) {
View Full Code Here

Examples of org.jruby.ast.executable.Script

     * @return The result of executing the specified script
     */
    public IRubyObject runWithGetsLoop(Node scriptNode, boolean printing, boolean processLineEnds, boolean split, boolean yarvCompile) {
        ThreadContext context = getCurrentContext();
       
        Script script = null;
        YARVCompiledRunner runner = null;
        boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();
        if (compile || !yarvCompile) {
            script = tryCompile(scriptNode);
            if (compile && script == null) {
View Full Code Here

Examples of org.jruby.ast.executable.Script

     * @param yarvCompile Whether to compile the script to YARV (Ruby 1.9)
     * bytecode before execution
     * @return The result of executing the script
     */
    public IRubyObject runNormally(Node scriptNode, boolean yarvCompile) {
        Script script = null;
        YARVCompiledRunner runner = null;
        boolean compile = getInstanceConfig().getCompileMode().shouldPrecompileCLI();
        boolean forceCompile = getInstanceConfig().getCompileMode().shouldPrecompileAll();
        if (yarvCompile) {
            runner = tryCompileYarv(scriptNode);
View Full Code Here

Examples of org.jruby.ast.executable.Script

    private Script tryCompile(Node node) {
        return tryCompile(node, new JRubyClassLoader(getJRubyClassLoader()));
    }
   
    private Script tryCompile(Node node, JRubyClassLoader classLoader) {
        Script script = null;
        try {
            String filename = node.getPosition().getFile();
            String classname = JavaNameMangler.mangledFilenameForStartupClasspath(filename);

            ASTInspector inspector = new ASTInspector();
View Full Code Here

Examples of org.jruby.ast.executable.Script

            context.setFile(filename);
            context.preNodeEval(objectClass, self, filename);
           
            Node scriptNode = parseFile(in, filename, null);
           
            Script script = tryCompile(scriptNode, new JRubyClassLoader(jrubyClassLoader));
            if (script == null) {
                System.err.println("Error, could not compile; pass -J-Djruby.jit.logging.verbose=true for more details");
            }

            runScript(script);
View Full Code Here

Examples of org.librebiz.pureport.definition.Script

    }

    public void endScript() {
        String s = textHandler.end();
        if (s != null && s.length() > 0) {
            sectionContainer.addContent(new Script(s));
        }
    }
View Full Code Here

Examples of org.lightfish.business.escalation.entity.Script


   
   
    public String save(){
        Script script = new Script();
        script.setName(scriptName);
        script.setContent(content);
        script.setBasicMessage(basicMessage);
        script.setRichMessage(richMessage);
        script.setActive(true);
        scriptStore.save(script);
       
        scriptName = null;
        content = null;
       
View Full Code Here

Examples of org.lightview.model.Script

        this.resyncActiveScripts();
    }

    @Override
    public void newScript(String name, String content) {
        this.scriptManager.registerNewScript(new Script(name, content, true));
        this.resyncActiveScripts();
    }
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.