Package org.cx4a.rsense.ruby

Examples of org.cx4a.rsense.ruby.LocalScope


    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


        Ruby runtime = graph.getRuntime();
        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);
View Full Code Here

        RubyModule klass = module.defineOrGetClassUnder(name, superClass, SourceLocation.of(node));

        if (klass != null) {
            context.pushFrame(klass, name, klass, null, Visibility.PUBLIC);
            context.pushScope(new LocalScope(klass));

            RuntimeHelper.classPartialUpdate(this, klass, node.getBodyNode());

            context.popScope();
            context.popFrame();
View Full Code Here

        RubyModule module = enclosingModule.defineOrGetModuleUnder(name, SourceLocation.of(node));

        if (module != null) {
            context.pushFrame(module, name, module, null, Visibility.PUBLIC);
            context.pushScope(new LocalScope(module));

            RuntimeHelper.classPartialUpdate(this, module, node.getBodyNode());

            context.popScope();
            context.popFrame();
View Full Code Here

                RubyClass klass = object.getMetaClass();
                if (klass.isSingleton()) {
                    MetaClass metaClass = (MetaClass) klass;
                    if (metaClass.getAttached() instanceof RubyModule) {
                        context.pushFrame(klass, "sclass", klass, null, Visibility.PUBLIC);
                        context.pushScope(new LocalScope((RubyModule) metaClass.getAttached()));

                        if (node.getBodyNode() != null) {
                            createVertex(node.getBodyNode());
                        }
View Full Code Here

TOP

Related Classes of org.cx4a.rsense.ruby.LocalScope

Copyright © 2018 www.massapicom. 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.