public class SharedBindingDynamicScope extends DynamicScope
evalScope, parent, staticScope
Constructor and Description |
---|
SharedBindingDynamicScope(StaticScope staticScope,
IRMethod irMethod) |
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 |
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.
|
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.
|
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;
|
getAllNamesInScope, getEvalScope, getFlipScope, getNextCapturedScope, getNthParentScope, getStaticScope, newDummyScope, newDynamicScope, newDynamicScope, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setArgValues, setValue, toString, toString
public SharedBindingDynamicScope(StaticScope staticScope, IRMethod irMethod)
public DynamicScope cloneScope()
cloneScope
in class DynamicScope
public IRubyObject[] getValues()
getValues
in class DynamicScope
public IRubyObject getValue(int offset, int depth)
getValue
in class DynamicScope
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 DynamicScope
public IRubyObject getValueDepthZeroOrNil(int offset, IRubyObject nil)
DynamicScope
getValueDepthZeroOrNil
in class DynamicScope
public IRubyObject getValueZeroDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueZeroDepthZeroOrNil
in class DynamicScope
public IRubyObject getValueOneDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueOneDepthZeroOrNil
in class DynamicScope
public IRubyObject getValueTwoDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueTwoDepthZeroOrNil
in class DynamicScope
public IRubyObject getValueThreeDepthZeroOrNil(IRubyObject nil)
DynamicScope
getValueThreeDepthZeroOrNil
in class DynamicScope
public IRubyObject setValue(int offset, IRubyObject value, int depth)
setValue
in class DynamicScope
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 DynamicScope
value
- to setoffset
- zero-indexed value that represents where variable livespublic IRubyObject setValueZeroDepthZero(IRubyObject value)
DynamicScope
setValueZeroDepthZero
in class DynamicScope
public IRubyObject setValueOneDepthZero(IRubyObject value)
DynamicScope
setValueOneDepthZero
in class DynamicScope
public IRubyObject setValueTwoDepthZero(IRubyObject value)
DynamicScope
setValueTwoDepthZero
in class DynamicScope
public IRubyObject setValueThreeDepthZero(IRubyObject value)
DynamicScope
setValueThreeDepthZero
in class DynamicScope
public void setArgValues(IRubyObject[] values, int size)
setArgValues
in class DynamicScope
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 DynamicScope
public void setArgValues(IRubyObject arg0, IRubyObject arg1)
setArgValues
in class DynamicScope
public void setArgValues(IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
setArgValues
in class DynamicScope
public void setEndArgValues(IRubyObject[] values, int index, int size)
setEndArgValues
in class DynamicScope
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()
getArgValues
in class DynamicScope
public void growIfNeeded()
growIfNeeded
in class DynamicScope
Copyright © 2001-2014 JRuby. All Rights Reserved.