public class OneVarDynamicScope extends NoVarsDynamicScope
Modifier and Type | Field and Description |
---|---|
protected IRubyObject |
variableValueZero |
evalScope, parent, staticScope
Constructor and Description |
---|
OneVarDynamicScope(StaticScope staticScope) |
OneVarDynamicScope(StaticScope staticScope,
DynamicScope parent) |
Modifier and Type | Method and Description |
---|---|
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 |
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 |
getValueZeroDepthZeroOrNil(IRubyObject nil)
getValueOrNil for index 0, depth 0
|
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 |
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 |
setValueZeroDepthZero(IRubyObject value)
Set value zero in this scope;
|
getValueOneDepthZeroOrNil, getValueThreeDepthZeroOrNil, getValueTwoDepthZeroOrNil, growIfNeeded, setArgValues, setArgValues, setValueOneDepthZero, setValueThreeDepthZero, setValueTwoDepthZero
clearEvalType, getAllNamesInScope, getEvalType, getFlipScope, getNthParentScope, getParentScope, getStaticScope, inBindingEval, inInstanceEval, inModuleEval, newDummyScope, newDynamicScope, newDynamicScope, newDynamicScope, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setEvalType, setValue, toString, toString
protected IRubyObject variableValueZero
public OneVarDynamicScope(StaticScope staticScope, DynamicScope parent)
public OneVarDynamicScope(StaticScope staticScope)
public void growIfNeeded()
growIfNeeded
in class NoVarsDynamicScope
public DynamicScope cloneScope()
cloneScope
in class NoVarsDynamicScope
public IRubyObject[] getValues()
getValues
in class NoVarsDynamicScope
public IRubyObject getValue(int offset, int depth)
getValue
in class NoVarsDynamicScope
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 NoVarsDynamicScope
public IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScope
getValueDepthZeroOrNil
in class NoVarsDynamicScope
public IRubyObject getValueZeroDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueZeroDepthZeroOrNil
in class NoVarsDynamicScope
public IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue
in class NoVarsDynamicScope
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 NoVarsDynamicScope
value
- to setoffset
- zero-indexed value that represents where variable livespublic IRubyObject setValueZeroDepthZero(IRubyObject value)
DynamicScope
setValueZeroDepthZero
in class NoVarsDynamicScope
public void setArgValues(IRubyObject[] values, int size)
setArgValues
in class NoVarsDynamicScope
values
- up to size specified to be mapped as ordinary parm valuessize
- is the number of values to assign as ordinary parm valuespublic void setArgValues(IRubyObject arg0)
setArgValues
in class NoVarsDynamicScope
public void setEndArgValues(IRubyObject[] values, int index, int size)
setEndArgValues
in class NoVarsDynamicScope
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 IRubyObject[] getArgValues()
DynamicScope
getArgValues
in class NoVarsDynamicScope
Copyright © 2001-2015 JRuby. All Rights Reserved.