public class FourVarDynamicScope extends ThreeVarDynamicScope
Modifier and Type | Field and Description |
---|---|
protected IRubyObject |
variableValueThree |
variableValueTwo
variableValueOne
variableValueZero
parent, staticScope
Constructor and Description |
---|
FourVarDynamicScope(StaticScope staticScope) |
FourVarDynamicScope(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 |
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
|
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 |
setValueThreeDepthZero(IRubyObject value)
Set value three in this scope.
|
getValueTwoDepthZeroOrNil, setValueTwoDepthZero
getValueOneDepthZeroOrNil, setValueOneDepthZero
getValueZeroDepthZeroOrNil, setValueZeroDepthZero
growIfNeeded
clearEvalType, getAllNamesInScope, getEvalType, getFlipScope, getNextCapturedScope, getNthParentScope, getParentScope, getStaticScope, inBindingEval, inInstanceEval, inModuleEval, isLambda, newDummyScope, newDynamicScope, newDynamicScope, newDynamicScope, setEvalType, setLambda, setValue, toString, toString
protected IRubyObject variableValueThree
public FourVarDynamicScope(StaticScope staticScope, DynamicScope parent)
public FourVarDynamicScope(StaticScope staticScope)
public void growIfNeeded()
growIfNeeded
in class ThreeVarDynamicScope
public DynamicScope cloneScope()
cloneScope
in class ThreeVarDynamicScope
public IRubyObject[] getValues()
getValues
in class ThreeVarDynamicScope
public IRubyObject getValue(int offset, int depth)
getValue
in class ThreeVarDynamicScope
offset
- 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 ThreeVarDynamicScope
public IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScope
getValueDepthZeroOrNil
in class ThreeVarDynamicScope
public IRubyObject getValueThreeDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueThreeDepthZeroOrNil
in class NoVarsDynamicScope
public IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue
in class ThreeVarDynamicScope
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 ThreeVarDynamicScope
value
- to setoffset
- zero-indexed value that represents where variable livespublic IRubyObject setValueThreeDepthZero(IRubyObject value)
DynamicScope
setValueThreeDepthZero
in class NoVarsDynamicScope
Copyright © 2001-2016 JRuby. All Rights Reserved.