public class TwoVarDynamicScope extends OneVarDynamicScope
| Modifier and Type | Field and Description |
|---|---|
protected IRubyObject |
variableValueOne |
variableValueZeroparent, staticScope| Constructor and Description |
|---|
TwoVarDynamicScope(StaticScope staticScope) |
TwoVarDynamicScope(StaticScope staticScope,
DynamicScope parent) |
| Modifier and Type | Method and Description |
|---|---|
DynamicScope |
cloneScope() |
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() |
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.
|
getValueOrNil, getValueZeroDepthZeroOrNil, setValueZeroDepthZerogetValueThreeDepthZeroOrNil, getValueTwoDepthZeroOrNil, growIfNeeded, setValueThreeDepthZero, setValueTwoDepthZeroclearEvalType, getAllNamesInScope, getEvalType, getFlipScope, getNextCapturedScope, getNthParentScope, getParentScope, getStaticScope, inBindingEval, inInstanceEval, inModuleEval, isLambda, newDummyScope, newDynamicScope, newDynamicScope, newDynamicScope, setEvalType, setLambda, setValue, toString, toStringprotected IRubyObject variableValueOne
public TwoVarDynamicScope(StaticScope staticScope, DynamicScope parent)
public TwoVarDynamicScope(StaticScope staticScope)
public void growIfNeeded()
growIfNeeded in class OneVarDynamicScopepublic DynamicScope cloneScope()
cloneScope in class OneVarDynamicScopepublic IRubyObject[] getValues()
getValues in class OneVarDynamicScopepublic IRubyObject getValue(int offset, int depth)
getValue in class OneVarDynamicScopeoffset - zero-indexed value that represents where variable livesdepth - how many captured scopes down this variable should be setpublic IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScopegetValueDepthZeroOrNil in class OneVarDynamicScopepublic IRubyObject getValueOneDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueOneDepthZeroOrNil in class NoVarsDynamicScopepublic IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue in class OneVarDynamicScopeoffset - 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)
DynamicScopesetValueDepthZero in class OneVarDynamicScopevalue - to setoffset - zero-indexed value that represents where variable livespublic IRubyObject setValueOneDepthZero(IRubyObject value)
DynamicScopesetValueOneDepthZero in class NoVarsDynamicScopeCopyright © 2001-2015 JRuby. All Rights Reserved.