Examples of ManyVarsDynamicScope


Examples of org.jruby.runtime.scope.ManyVarsDynamicScope

     */
    public void remove() {
        ThreadContext context = receiver.getRuntime().getCurrentContext();
        try {
            DynamicScope currentScope = context.getCurrentScope();
            ManyVarsDynamicScope scope = (ManyVarsDynamicScope) context.getCurrentScope();
            scope = new ManyVarsDynamicScope(context.runtime.getStaticScopeFactory().newEvalScope(currentScope.getStaticScope()), currentScope);
        } catch (ArrayIndexOutOfBoundsException e) {
            //no context is left.
            //no operation is needed.
        }
    }
View Full Code Here

Examples of org.jruby.runtime.scope.ManyVarsDynamicScope

        if (obj != null && obj instanceof Boolean && ((Boolean) obj) == false) {
            sharing_variables = false;
        }

        if (sharing_variables) {
            ManyVarsDynamicScope scope;
            if (unit != null && unit.getScope() != null) scope = unit.getScope();
            else scope = EmbedRubyRuntimeAdapterImpl.getManyVarsDynamicScope(container, 0);
            container.getVarMap().inject(scope, 0, rubyReceiver);
            runtime.getCurrentContext().pushScope(scope);
        }
View Full Code Here

Examples of org.jruby.runtime.scope.ManyVarsDynamicScope

        this.runtimeCache = runtime.getRuntimeCache();
       
        // TOPLEVEL self and a few others want a top-level scope.  We create this one right
        // away and then pass it into top-level parse so it ends up being the top level.
        StaticScope topStaticScope = runtime.getStaticScopeFactory().newLocalScope(null);
        pushScope(new ManyVarsDynamicScope(topStaticScope, null));

        Frame[] stack = frameStack;
        int length = stack.length;
        for (int i = 0; i < length; i++) {
            stack[i] = new Frame();
View Full Code Here

Examples of org.jruby.runtime.scope.ManyVarsDynamicScope

        case 3:
            return new ThreeVarDynamicScope(staticScope, parent);
        case 4:
            return new FourVarDynamicScope(staticScope, parent);
        default:
            return new ManyVarsDynamicScope(staticScope, parent);
        }
    }
View Full Code Here

Examples of org.jruby.runtime.scope.ManyVarsDynamicScope

            DynamicScope parent = getParentScope();
            if (parent != null && parent.getEvalScope(runtime) == this) {
                evalScope = this;
            } else {
                // bindings scopes must always be ManyVars scopes since evals can grow them
                evalScope = new ManyVarsDynamicScope(runtime.getStaticScopeFactory().newEvalScope(getStaticScope()), this);
            }
        }

        return evalScope;
    }
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.