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 intprotected final booleanprotected final RubySymbolprotected final intprotected final intFields 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 LocalVariablevoidbooleangetId()intgetName()intintinthashCode()booleanbooleanisSameDepth(LocalVariable other) retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, Object[] temp) toString()voidMethods inherited from class org.jruby.ir.operands.Variable
addUsedVariables, canCopyPropagate, cloneForInlining, getSimplifiedOperand, getValue, isSelfMethods 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:
getOperandTypein 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:DepthCloneableHow deep is this operand from where it is defined?- Specified by:
cloneForDepthin interfaceDepthCloneable
-
isOuterScopeVar
public boolean isOuterScopeVar() -
encode
-
decode
-
visit
-