public Frame preYieldLightBlock(Binding binding, DynamicScope emptyScope, RubyModule klass) { Frame lastFrame = preYieldNoScope(binding, klass); // just push the same empty scope, since we won't use one pushScope(emptyScope); return lastFrame; }
public Frame preYieldLightBlock(Binding binding, DynamicScope emptyScope, RubyModule klass) { Frame lastFrame = preYieldNoScope(binding, klass); // just push the same empty scope, since we won't use one pushScope(emptyScope); return lastFrame; }
public void preMethodFrameAndDummyScope(RubyModule clazz, String name, IRubyObject self, Block block, StaticScope staticScope) { pushCallFrame(clazz, name, self, block); pushScope(staticScope.getDummyScope()); }
public void preMethodFrameAndScope(RubyModule clazz, String name, IRubyObject self, Block block, StaticScope staticScope) { pushCallFrame(clazz, name, self, block); pushScope(DynamicScope.newDynamicScope(staticScope)); }
public void preMethodScopeOnly(RubyModule clazz, StaticScope staticScope) { RubyModule implementationClass = staticScope.getModule(); // FIXME: This is currently only here because of some problems with IOOutputStream writing to a "bare" runtime without a proper scope if (implementationClass == null) { implementationClass = clazz; } pushScope(DynamicScope.newDynamicScope(staticScope)); pushRubyClass(implementationClass); }
public Frame preYieldSpecificBlock(Binding binding, StaticScope scope, RubyModule klass) { Frame lastFrame = preYieldNoScope(binding, klass); // new scope for this invocation of the block, based on parent scope pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope())); return lastFrame; }
public Frame preYieldSpecificBlock(Binding binding, StaticScope scope) { Frame lastFrame = preYieldNoScope(binding); // new scope for this invocation of the block, based on parent scope pushScope(DynamicScope.newDynamicScope(scope, binding.getDynamicScope())); return lastFrame; }
@Interp @JIT public static DynamicScope pushBlockDynamicScopeIfNeeded(ThreadContext context, Block block, boolean pushNewDynScope, boolean reuseParentDynScope) { DynamicScope newScope = getNewBlockScope(block, pushNewDynScope, reuseParentDynScope); if (newScope != null) { context.pushScope(newScope); } return newScope; }
public void preMethodNoFrameAndDummyScope(RubyModule clazz, StaticScope staticScope) { RubyModule implementationClass = staticScope.getModule(); // FIXME: This is currently only here because of some problems with IOOutputStream writing to a "bare" runtime without a proper scope if (implementationClass == null) { implementationClass = clazz; } pushScope(staticScope.getDummyScope()); pushRubyClass(implementationClass); }
public void preMethodNoFrameAndDummyScope(RubyModule clazz, StaticScope staticScope) { RubyModule implementationClass = staticScope.getModule(); // FIXME: This is currently only here because of some problems with IOOutputStream writing to a "bare" runtime without a proper scope if (implementationClass == null) { implementationClass = clazz; } pushScope(staticScope.getDummyScope()); pushRubyClass(implementationClass); }
protected void pre(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass) { // update call stacks (push: frame, class, scope, etc.) context.preMethodFrameOnly(implClass, name, self, block); if (ic.pushNewDynScope()) { context.pushScope(DynamicScope.newDynamicScope(ic.getStaticScope())); } }
public void preMethodFrameAndDummyScope(RubyModule clazz, String name, IRubyObject self, Block block, StaticScope staticScope) { RubyModule implementationClass = staticScope.getModule(); // FIXME: This is currently only here because of some problems with IOOutputStream writing to a "bare" runtime without a proper scope if (implementationClass == null) { implementationClass = clazz; } pushCallFrame(clazz, name, self, block); pushScope(staticScope.getDummyScope()); pushRubyClass(implementationClass); }
public void preMethodFrameAndScope(RubyModule clazz, String name, IRubyObject self, Block block, StaticScope staticScope) { RubyModule implementationClass = staticScope.getModule(); // FIXME: This is currently only here because of some problems with IOOutputStream writing to a "bare" runtime without a proper scope if (implementationClass == null) { implementationClass = clazz; } pushCallFrame(clazz, name, self, block); pushScope(DynamicScope.newDynamicScope(staticScope)); pushRubyClass(implementationClass); }
protected void pre(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass) { // update call stacks (push: frame, class, scope, etc.) context.preMethodFrameOnly(implClass, name, self, block); if (ic.pushNewDynScope()) { context.pushScope(DynamicScope.newDynamicScope(ic.getStaticScope())); } }
protected void pre(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass) { // update call stacks (push: frame, class, scope, etc.) context.preMethodFrameOnly(implClass, name, self, block); if (ic.pushNewDynScope()) { context.pushScope(DynamicScope.newDynamicScope(ic.getStaticScope())); } }
protected void pre(ThreadContext context, StaticScope staticScope, RubyModule implementationClass, IRubyObject self, String name, Block block) { // update call stacks (push: frame, class, needsDynamicScope, etc.) context.preMethodFrameOnly(implementationClass, name, self, block); if (needsDynamicScope) { // Add a parent-link to current dynscope to support non-local returns cheaply // This doesn't affect variable scoping since local variables will all have // the right needsDynamicScope depth. context.pushScope(DynamicScope.newDynamicScope(staticScope, context.getCurrentScope())); } context.setCurrentVisibility(getVisibility()); }
public void preClassEval(StaticScope staticScope, RubyModule type) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); pushScope(DynamicScope.newDynamicScope(staticScope, null)); }
@Override protected void pre(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass) { // update call stacks (push: frame, class, scope, etc.) context.preMethodFrameOnly(getImplementationClass(), name, self, block); if (ic.pushNewDynScope()) { // Add a parent-link to current dynscope to support non-local returns cheaply // This doesn't affect variable scoping since local variables will all have // the right scope depth. context.pushScope(DynamicScope.newDynamicScope(ic.getStaticScope(), context.getCurrentScope())); } context.setCurrentVisibility(getVisibility()); }
public void preCompiledClass(RubyModule type, StaticScope staticScope) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); staticScope.setModule(type); pushScope(DynamicScope.newDynamicScope(staticScope)); }
public void preExecuteUnder(IRubyObject executeUnderObj, RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), executeUnderObj, block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }