org.jruby.runtime.scope
Class DummyDynamicScope

java.lang.Object
  extended by org.jruby.runtime.DynamicScope
      extended by org.jruby.runtime.scope.NoVarsDynamicScope
          extended by org.jruby.runtime.scope.DummyDynamicScope

public class DummyDynamicScope
extends NoVarsDynamicScope

This is a DynamicScope that does not support any variables. It differs from NoVarsDynamicScope in that it has hard failures for "backref" and "lastline" accesses, since in the JRuby 1.3 cycle it was discovered that threads were sharing a single dummyscope while still setting per-call backrefs. The hard errors here are an attempt to catch such situations in the future, before the optimizing compiler work makes such determinations in advance.


Field Summary
 
Fields inherited from class org.jruby.runtime.DynamicScope
evalScope, parent, staticScope
 
Constructor Summary
DummyDynamicScope(StaticScope staticScope)
           
DummyDynamicScope(StaticScope staticScope, DynamicScope parent)
           
 
Method Summary
 DynamicScope cloneScope()
           
 IRubyObject getBackRef(Ruby runtime)
          Get backref
 IRubyObject getLastLine(Ruby runtime)
          Get lastline
 void growIfNeeded()
           
protected  void growIfNeeded(int size, java.lang.String message)
           
 IRubyObject setBackRef(IRubyObject backref)
          Set backref
 IRubyObject setLastLine(IRubyObject lastline)
          Set lastline
 
Methods inherited from class org.jruby.runtime.scope.NoVarsDynamicScope
getArgValues, getValue, getValueDepthZeroOrNil, getValueOneDepthZeroOrNil, getValueOrNil, getValues, getValueThreeDepthZeroOrNil, getValueTwoDepthZeroOrNil, getValueZeroDepthZeroOrNil, setArgValues, setArgValues, setArgValues, setArgValues, setEndArgValues, setValue, setValueDepthZero, setValueOneDepthZero, setValueThreeDepthZero, setValueTwoDepthZero, setValueZeroDepthZero
 
Methods inherited from class org.jruby.runtime.DynamicScope
getAllNamesInScope, getEvalScope, getFlipScope, getNextCapturedScope, getNthParentScope, getStaticScope, newDummyScope, newDynamicScope, newDynamicScope, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setValue, toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DummyDynamicScope

public DummyDynamicScope(StaticScope staticScope,
                         DynamicScope parent)

DummyDynamicScope

public DummyDynamicScope(StaticScope staticScope)
Method Detail

growIfNeeded

public void growIfNeeded()
Overrides:
growIfNeeded in class NoVarsDynamicScope

growIfNeeded

protected void growIfNeeded(int size,
                            java.lang.String message)
Overrides:
growIfNeeded in class NoVarsDynamicScope

cloneScope

public DynamicScope cloneScope()
Overrides:
cloneScope in class NoVarsDynamicScope

getBackRef

public IRubyObject getBackRef(Ruby runtime)
Get backref

Overrides:
getBackRef in class DynamicScope

setBackRef

public IRubyObject setBackRef(IRubyObject backref)
Set backref

Overrides:
setBackRef in class DynamicScope

getLastLine

public IRubyObject getLastLine(Ruby runtime)
Get lastline

Overrides:
getLastLine in class DynamicScope

setLastLine

public IRubyObject setLastLine(IRubyObject lastline)
Set lastline

Overrides:
setLastLine in class DynamicScope


Copyright © 2002-2007 JRuby Team. All Rights Reserved.