コード例 #1
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public void preClassEval(StaticScope staticScope, RubyModule type) {
   pushRubyClass(type);
   pushFrameCopy();
   getCurrentFrame().setSelf(type);
   getCurrentFrame().setVisibility(Visibility.PUBLIC);
   pushScope(DynamicScope.newDynamicScope(staticScope, null));
 }
コード例 #2
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public void preCompiledClassDummyScope(RubyModule type, StaticScope staticScope) {
   pushRubyClass(type);
   pushFrameCopy();
   getCurrentFrame().setSelf(type);
   getCurrentFrame().setVisibility(Visibility.PUBLIC);
   staticScope.setModule(type);
   pushScope(staticScope.getDummyScope());
 }
コード例 #3
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 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);
 }
コード例 #4
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
  // 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());
  }
コード例 #5
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
  public void prepareTopLevel(RubyClass objectClass, IRubyObject topSelf) {
    pushFrame();
    setCurrentVisibility(Visibility.PRIVATE);

    pushRubyClass(objectClass);

    Frame frame = getCurrentFrame();
    frame.setSelf(topSelf);

    getCurrentScope().getStaticScope().setModule(objectClass);
  }
コード例 #6
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 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);
 }
コード例 #7
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 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);
 }
コード例 #8
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public Frame preEvalWithBinding(Binding binding) {
   binding.getFrame().setIsBindingFrame(true);
   Frame lastFrame = pushFrameForEval(binding);
   pushRubyClass(binding.getKlass());
   return lastFrame;
 }
コード例 #9
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public Frame preYieldNoScope(Binding binding, RubyModule klass) {
   pushRubyClass((klass != null) ? klass : binding.getKlass());
   return pushFrameForBlock(binding);
 }
コード例 #10
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public void preNodeEval(RubyModule rubyClass, IRubyObject self) {
   pushRubyClass(rubyClass);
   pushEvalFrame(self);
 }
コード例 #11
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public void preMethodFrameOnly(RubyModule clazz, String name, IRubyObject self, Block block) {
   pushRubyClass(clazz);
   pushCallFrame(clazz, name, self, block);
 }
コード例 #12
0
ファイル: ThreadContext.java プロジェクト: jlieske/jruby
 public void preAdoptThread() {
   pushFrame();
   pushRubyClass(runtime.getObject());
   getCurrentFrame().setSelf(runtime.getTopSelf());
 }