public class SharedBindingDynamicScope extends DynamicScope
parent, staticScope| Constructor and Description |
|---|
SharedBindingDynamicScope(StaticScope staticScope,
IRMethod irMethod) |
| 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 |
getValueOrNil(int offset,
int depth,
IRubyObject nil)
Variation of getValue that checks for nulls, returning and setting the given value (presumably nil)
|
IRubyObject[] |
getValues() |
IRubyObject |
getValueThreeDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 3, depth 0
|
IRubyObject |
getValueTwoDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 2, depth 0
|
IRubyObject |
getValueZeroDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 0, depth 0
|
void |
growIfNeeded()
Make a larger dynamic scope if the static scope grew.
|
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.
|
IRubyObject |
setValueThreeDepthZero(IRubyObject value)
Set value three in this scope.
|
IRubyObject |
setValueTwoDepthZero(IRubyObject value)
Set value two in this scope.
|
IRubyObject |
setValueZeroDepthZero(IRubyObject value)
Set value zero in this scope;
|
clearEvalType, getAllNamesInScope, getEvalType, getFlipScope, getNextCapturedScope, getNthParentScope, getParentScope, getStaticScope, inBindingEval, inInstanceEval, inModuleEval, isLambda, newDummyScope, newDynamicScope, newDynamicScope, newDynamicScope, setEvalType, setLambda, setValue, toString, toStringpublic SharedBindingDynamicScope(StaticScope staticScope, IRMethod irMethod)
public DynamicScope cloneScope()
cloneScope in class DynamicScopepublic IRubyObject[] getValues()
getValues in class DynamicScopepublic IRubyObject getValue(int offset, int depth)
getValue in class DynamicScopeoffset - zero-indexed value that represents where variable livesdepth - how many captured scopes down this variable should be setpublic IRubyObject getValueOrNil(int offset, int depth, IRubyObject nil)
getValueOrNil in class DynamicScopepublic IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScopegetValueDepthZeroOrNil in class DynamicScopepublic IRubyObject getValueZeroDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueZeroDepthZeroOrNil in class DynamicScopepublic IRubyObject getValueOneDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueOneDepthZeroOrNil in class DynamicScopepublic IRubyObject getValueTwoDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueTwoDepthZeroOrNil in class DynamicScopepublic IRubyObject getValueThreeDepthZeroOrNil(IRubyObject nil)
DynamicScopegetValueThreeDepthZeroOrNil in class DynamicScopepublic IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue in class DynamicScopeoffset - 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 DynamicScopevalue - to setoffset - zero-indexed value that represents where variable livespublic IRubyObject setValueZeroDepthZero(IRubyObject value)
DynamicScopesetValueZeroDepthZero in class DynamicScopepublic IRubyObject setValueOneDepthZero(IRubyObject value)
DynamicScopesetValueOneDepthZero in class DynamicScopepublic IRubyObject setValueTwoDepthZero(IRubyObject value)
DynamicScopesetValueTwoDepthZero in class DynamicScopepublic IRubyObject setValueThreeDepthZero(IRubyObject value)
DynamicScopesetValueThreeDepthZero in class DynamicScopepublic void growIfNeeded()
growIfNeeded in class DynamicScopeCopyright © 2001-2015 JRuby. All Rights Reserved.