|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.runtime.DynamicScope
org.jruby.runtime.scope.NoVarsDynamicScope
org.jruby.runtime.scope.OneVarDynamicScope
org.jruby.runtime.scope.TwoVarDynamicScope
public class TwoVarDynamicScope
This is a DynamicScope that supports exactly three variables.
Field Summary | |
---|---|
protected IRubyObject |
variableValueOne
|
Fields inherited from class org.jruby.runtime.scope.OneVarDynamicScope |
---|
variableValueZero |
Fields inherited from class org.jruby.runtime.DynamicScope |
---|
evalScope, parent, staticScope |
Constructor Summary | |
---|---|
TwoVarDynamicScope(StaticScope staticScope)
|
|
TwoVarDynamicScope(StaticScope staticScope,
DynamicScope parent)
|
Method Summary | |
---|---|
DynamicScope |
cloneScope()
|
IRubyObject[] |
getArgValues()
Copy variable values back for ZSuper call. |
IRubyObject |
getValue(int offset,
int depth)
Get value from current scope or one of its captured scopes. |
IRubyObject |
getValueDepthZeroOrNil(int offset,
IRubyObject nil)
getValueOrNil for depth 0 |
IRubyObject |
getValueOneDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 1, depth 0 |
IRubyObject[] |
getValues()
|
void |
growIfNeeded()
|
void |
setArgValues(IRubyObject arg0)
|
void |
setArgValues(IRubyObject[] values,
int size)
Set all values which represent 'normal' parameters in a call list to this dynamic scope. |
void |
setArgValues(IRubyObject arg0,
IRubyObject arg1)
|
void |
setArgValues(IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2)
|
void |
setEndArgValues(IRubyObject[] values,
int index,
int size)
|
IRubyObject |
setValue(int offset,
IRubyObject value,
int depth)
Set value in current dynamic scope or one of its captured scopes. |
IRubyObject |
setValueDepthZero(IRubyObject value,
int offset)
setValue for depth zero |
IRubyObject |
setValueOneDepthZero(IRubyObject value)
Set value one in this scope. |
java.lang.String |
toString(java.lang.StringBuffer buf,
java.lang.String indent)
|
Methods inherited from class org.jruby.runtime.scope.OneVarDynamicScope |
---|
getValueOrNil, getValueZeroDepthZeroOrNil, setValueZeroDepthZero |
Methods inherited from class org.jruby.runtime.scope.NoVarsDynamicScope |
---|
getValueThreeDepthZeroOrNil, getValueTwoDepthZeroOrNil, setValueThreeDepthZero, setValueTwoDepthZero |
Methods inherited from class org.jruby.runtime.DynamicScope |
---|
getAllNamesInScope, getEvalScope, getFlipScope, getNextCapturedScope, getNthParentScope, getStaticScope, newDummyScope, newDynamicScope, newDynamicScope, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected IRubyObject variableValueOne
Constructor Detail |
---|
public TwoVarDynamicScope(StaticScope staticScope, DynamicScope parent)
public TwoVarDynamicScope(StaticScope staticScope)
Method Detail |
---|
public void growIfNeeded()
growIfNeeded
in class OneVarDynamicScope
public DynamicScope cloneScope()
cloneScope
in class OneVarDynamicScope
public IRubyObject[] getValues()
getValues
in class OneVarDynamicScope
public IRubyObject getValue(int offset, int depth)
getValue
in class OneVarDynamicScope
offset
- zero-indexed value that represents where variable livesdepth
- how many captured scopes down this variable should be set
public IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScope
getValueDepthZeroOrNil
in class OneVarDynamicScope
public IRubyObject getValueOneDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueOneDepthZeroOrNil
in class NoVarsDynamicScope
public IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue
in class OneVarDynamicScope
offset
- zero-indexed value that represents where variable livesvalue
- to setdepth
- how many captured scopes down this variable should be setpublic IRubyObject setValueDepthZero(IRubyObject value, int offset)
DynamicScope
setValueDepthZero
in class OneVarDynamicScope
value
- to setoffset
- zero-indexed value that represents where variable livespublic IRubyObject setValueOneDepthZero(IRubyObject value)
DynamicScope
setValueOneDepthZero
in class NoVarsDynamicScope
public void setArgValues(IRubyObject[] values, int size)
setArgValues
in class OneVarDynamicScope
values
- up to size specified to be mapped as ordinary parm valuessize
- is the number of values to assign as ordinary parm valuespublic void setEndArgValues(IRubyObject[] values, int index, int size)
setEndArgValues
in class OneVarDynamicScope
values
- group where last n(size) values are usedindex
- index in the dynamic scope to start setting these valuessize
- which of the last size arguments of values parameter to setpublic void setArgValues(IRubyObject arg0)
setArgValues
in class OneVarDynamicScope
public void setArgValues(IRubyObject arg0, IRubyObject arg1)
setArgValues
in class OneVarDynamicScope
public void setArgValues(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
setArgValues
in class OneVarDynamicScope
public IRubyObject[] getArgValues()
DynamicScope
getArgValues
in class OneVarDynamicScope
public java.lang.String toString(java.lang.StringBuffer buf, java.lang.String indent)
toString
in class OneVarDynamicScope
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |