Examples of pushScope()


Examples of org.cx4a.rsense.ruby.Context.pushScope()

    public static void dummyCall(Graph graph, MethodDefNode node, Method method, IRubyObject receiver) {
        if (node.getBodyNode() != null) {
            Context context = graph.getRuntime().getContext();
            context.pushFrame(context.getFrameModule(), node.getName(), receiver, null, Visibility.PUBLIC);
            context.pushScope(new LocalScope(method.getModule()));
            graph.createVertex(node.getBodyNode());
            context.popScope();
            context.popFrame();
        }
        Logger.debug(SourceLocation.of(node), "dummy call: %s", method);
View Full Code Here

Examples of org.cx4a.rsense.ruby.Context.pushScope()

        Context context = runtime.getContext();

        Block block = attr.getBlock();
        Scope scope = new LocalScope(method.getModule());
        context.pushFrame(context.getFrameModule(), name, receiver, block, Visibility.PUBLIC);
        context.pushScope(scope);

        Template template = new Template(method, context.getCurrentFrame(), scope, attr);
        method.addTemplate(attr, template);

        Vertex returnVertex = template.getReturnVertex();
View Full Code Here

Examples of org.cx4a.rsense.ruby.Context.pushScope()

        }
       
        if (args != null && !args.isEmpty()) {
            for (IRubyObject value : args) {
                pushLoopFrame(context, block.getFrame(), returnVertex, vertex);
                context.pushScope(block.getScope());

                if (noargblock) {}
                else if (masgn != null) {
                    Array array;
                    if (!expanded) {
View Full Code Here

Examples of org.cx4a.rsense.ruby.Context.pushScope()

                context.popScope();
                popLoopFrame(context);
            }
        } else {
            pushLoopFrame(context, block.getFrame(), returnVertex, vertex);
            context.pushScope(block.getScope());

            if (block.getBodyNode() != null) {
                Vertex v = graph.createVertex(block.getBodyNode());
                graph.addEdgeAndPropagate(v, vertex);
            }
View Full Code Here

Examples of org.jruby.runtime.ThreadContext.pushScope()

        // Keep reference to current context to prevent it being collected.
        ThreadContext threadContext = runtime.getCurrentContext();
        try {
            if (sharing_variables) {
                vars.inject(scope, 0, null);
                threadContext.pushScope(scope);
            }
            IRubyObject ret;
            CompileMode mode = runtime.getInstanceConfig().getCompileMode();
            if (mode == CompileMode.FORCE) {
                ret = runtime.runScriptBody(script);
View Full Code Here

Examples of org.jruby.runtime.ThreadContext.pushScope()

        // Keep reference to current context to prevent it being collected.
        ThreadContext threadContext = runtime.getCurrentContext();
        if (sharing_variables) {
            vars.inject(scope, 0, null);
            threadContext.pushScope(scope);
        }
        try {
            IRubyObject ret;
            CompileMode mode = runtime.getInstanceConfig().getCompileMode();
            if (mode == CompileMode.FORCE) {
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.