public void preClassEval(StaticScope staticScope, RubyModule type) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); pushScope(DynamicScope.newDynamicScope(staticScope, null)); }
public void preCompiledClassDummyScope(RubyModule type, StaticScope staticScope) { pushRubyClass(type); pushFrameCopy(); getCurrentFrame().setSelf(type); getCurrentFrame().setVisibility(Visibility.PUBLIC); staticScope.setModule(type); pushScope(staticScope.getDummyScope()); }
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); }
// XXX: Again, screwy evaling under previous frame's scope public void preExecuteUnder(RubyModule executeUnderClass, Block block) { Frame frame = getCurrentFrame(); pushRubyClass(executeUnderClass); DynamicScope scope = getCurrentScope(); StaticScope sScope = new BlockStaticScope(scope.getStaticScope()); sScope.setModule(executeUnderClass); pushScope(DynamicScope.newDynamicScope(sScope, scope)); pushCallFrame(frame.getKlazz(), frame.getName(), frame.getSelf(), block); getCurrentFrame().setVisibility(getPreviousFrame().getVisibility()); }
public void prepareTopLevel(RubyClass objectClass, IRubyObject topSelf) { pushFrame(); setCurrentVisibility(Visibility.PRIVATE); pushRubyClass(objectClass); Frame frame = getCurrentFrame(); frame.setSelf(topSelf); getCurrentScope().getStaticScope().setModule(objectClass); }
public void preMethodBacktraceDummyScope(RubyModule clazz, String name, StaticScope staticScope) { pushBacktraceFrame(name); 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 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 Frame preEvalWithBinding(Binding binding) { binding.getFrame().setIsBindingFrame(true); Frame lastFrame = pushFrameForEval(binding); pushRubyClass(binding.getKlass()); return lastFrame; }
public Frame preYieldNoScope(Binding binding, RubyModule klass) { pushRubyClass((klass != null) ? klass : binding.getKlass()); return pushFrameForBlock(binding); }
public void preNodeEval(RubyModule rubyClass, IRubyObject self) { pushRubyClass(rubyClass); pushEvalFrame(self); }
public void preMethodFrameOnly(RubyModule clazz, String name, IRubyObject self, Block block) { pushRubyClass(clazz); pushCallFrame(clazz, name, self, block); }
public void preAdoptThread() { pushFrame(); pushRubyClass(runtime.getObject()); getCurrentFrame().setSelf(runtime.getTopSelf()); }