public void setCurrentVisibility(Visibility visibility) { getCurrentFrame().setVisibility(visibility); }
@Override protected final void post(ThreadContext context, Binding binding, Visibility vis, Frame lastFrame) { binding.getFrame().setVisibility(vis); context.postYieldLight(binding, lastFrame); } }
public void preExtensionLoad(IRubyObject self) { pushFrame(); getCurrentFrame().setSelf(self); getCurrentFrame().setVisibility(Visibility.PUBLIC); }
static void postYield(ThreadContext context, InterpreterContext ic, Binding binding, Visibility oldVis, Frame prevFrame) { // IMPORTANT: Do not clear eval-type in case this is reused in bindings! // Ex: eval("...", foo.instance_eval { binding }) // The dyn-scope used for binding needs to have its eval-type set to INSTANCE_EVAL binding.getFrame().setVisibility(oldVis); if (ic.popDynScope()) { context.postYield(binding, prevFrame); } else { context.postYieldNoScope(prevFrame); } }
static void postYield(ThreadContext context, InterpreterContext ic, Binding binding, Visibility oldVis, Frame prevFrame) { // IMPORTANT: Do not clear eval-type in case this is reused in bindings! // Ex: eval("...", foo.instance_eval { binding }) // The dyn-scope used for binding needs to have its eval-type set to INSTANCE_EVAL binding.getFrame().setVisibility(oldVis); if (ic.popDynScope()) { context.postYield(binding, prevFrame); } else { context.postYieldNoScope(prevFrame); } }
private Frame pushFrameForBlock(Binding binding) { Frame lastFrame = getNextFrame(); Frame f = pushFrame(binding.getFrame()); f.setVisibility(binding.getVisibility()); return lastFrame; }
protected void post(ThreadContext context, Block block, Visibility vis, Frame lastFrame) { block.getBinding().getFrame().setVisibility(vis); context.postYield(block.getBinding(), lastFrame); }
private Frame pushFrameForBlock(Binding binding) { Frame lastFrame = getNextFrame(); Frame bindingFrame = binding.getFrame(); bindingFrame.setVisibility(binding.getVisibility()); pushFrame(bindingFrame); return lastFrame; }
public void preExtensionLoad(IRubyObject self) { pushFrame(); getCurrentFrame().setSelf(self); getCurrentFrame().setVisibility(Visibility.PUBLIC); }
private Frame pushFrameForEval(Binding binding) { Frame lastFrame = getNextFrame(); Frame f = pushFrame(binding.getFrame()); f.setVisibility(binding.getVisibility()); return lastFrame; }
public void preExtensionLoad(IRubyObject self) { pushFrame(); pushRubyClass(runtime.getObject()); getCurrentFrame().setSelf(self); getCurrentFrame().setVisibility(Visibility.PUBLIC); }
public void preExtensionLoad(IRubyObject self) { pushFrame(); pushRubyClass(runtime.getObject()); getCurrentFrame().setSelf(self); getCurrentFrame().setVisibility(Visibility.PUBLIC); }
public void preClassEval(StaticScope staticScope, RubyModule type) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); pushScope(DynamicScope.newDynamicScope(staticScope, null)); }
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 preCompiledClass(RubyModule type, StaticScope staticScope) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); staticScope.setModule(type); pushScope(DynamicScope.newDynamicScope(staticScope)); }
public void preClassEval(StaticScope staticScope, RubyModule type) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); getCurrentFrame().setName(null); pushScope(DynamicScope.newDynamicScope(staticScope, null)); }
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()); }
public static Block createMethodBlock(MethodBlockBody body) { RubyModule module = body.method.getImplementationClass(); Frame frame = new Frame(); frame.setKlazz(module); frame.setName(body.method.getName()); frame.setSelf(body.receiver); frame.setVisibility(body.method.getVisibility()); Binding binding = new Binding( frame, body.getStaticScope().getDummyScope(), body.method.getName(), body.getFile(), body.getLine()); return new Block(body, binding); }
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()); }
public void preExecuteUnder(RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); DynamicScope scope = getCurrentScope(); StaticScope sScope = runtime.getStaticScopeFactory().newBlockScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), frame.getSelf(), block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }