Package org.jruby.ir.operands
Class LocalVariable
java.lang.Object
org.jruby.ir.operands.Operand
org.jruby.ir.operands.Variable
org.jruby.ir.operands.LocalVariable
- All Implemented Interfaces:
DepthCloneable
- Direct Known Subclasses:
ClosureLocalVariable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final int
protected final boolean
protected final RubySymbol
protected final int
protected final int
Fields inherited from class org.jruby.ir.operands.Operand
EMPTY_ARRAY
-
Constructor Summary
ConstructorsConstructorDescriptionLocalVariable
(RubySymbol name, int scopeDepth, int location) LocalVariable
(RubySymbol name, int scopeDepth, int location, boolean isOuterScopeVar) -
Method Summary
Modifier and TypeMethodDescriptionclone
(SimpleCloneInfo ii) cloneForDepth
(int n) How deep is this operand from where it is defined?static LocalVariable
void
boolean
getId()
int
getName()
int
int
int
hashCode()
boolean
boolean
isSameDepth
(LocalVariable other) retrieve
(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) toString()
void
Methods inherited from class org.jruby.ir.operands.Variable
addUsedVariables, canCopyPropagate, cloneForInlining, getSimplifiedOperand, getValue, isSelf
Methods inherited from class org.jruby.ir.operands.Operand
hasKnownValue, isFalseyImmediate, isTruthyImmediate
-
Field Details
-
name
-
scopeDepth
protected final int scopeDepth -
offset
protected final int offset -
hcode
protected final int hcode -
isOuterScopeVar
protected final boolean isOuterScopeVar
-
-
Constructor Details
-
LocalVariable
-
LocalVariable
-
-
Method Details
-
getOperandType
- Specified by:
getOperandType
in classOperand
-
isSameDepth
-
getScopeDepth
public int getScopeDepth() -
getOffset
public int getOffset() -
getLocation
public int getLocation() -
getId
-
getName
-
toString
-
hashCode
public int hashCode() -
equals
-
retrieve
public Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) -
clone
-
cloneForDepth
Description copied from interface:DepthCloneable
How deep is this operand from where it is defined?- Specified by:
cloneForDepth
in interfaceDepthCloneable
-
isOuterScopeVar
public boolean isOuterScopeVar() -
encode
-
decode
-
visit
-