public class LocalVariable extends Variable implements DepthCloneable
Modifier and Type | Field and Description |
---|---|
protected int |
hcode |
protected boolean |
isOuterScopeVar |
protected RubySymbol |
name |
protected int |
offset |
protected int |
scopeDepth |
EMPTY_ARRAY
Constructor and Description |
---|
LocalVariable(RubySymbol name,
int scopeDepth,
int location) |
LocalVariable(RubySymbol name,
int scopeDepth,
int location,
boolean isOuterScopeVar) |
Modifier and Type | Method and Description |
---|---|
Variable |
clone(SimpleCloneInfo ii) |
LocalVariable |
cloneForDepth(int n)
How deep is this operand from where it is defined?
|
int |
compareTo(java.lang.Object arg0) |
static LocalVariable |
decode(IRReaderDecoder d) |
void |
encode(IRWriterEncoder e) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getId() |
int |
getLocation() |
RubySymbol |
getName() |
int |
getOffset() |
OperandType |
getOperandType() |
int |
getScopeDepth() |
int |
hashCode() |
boolean |
isOuterScopeVar() |
boolean |
isSameDepth(LocalVariable other) |
java.lang.Object |
retrieve(ThreadContext context,
IRubyObject self,
StaticScope currScope,
DynamicScope currDynScope,
java.lang.Object[] temp) |
java.lang.String |
toString() |
void |
visit(IRVisitor visitor) |
addUsedVariables, canCopyPropagate, cloneForInlining, getSimplifiedOperand, getValue, isSelf
hasKnownValue, isFalseyImmediate, isTruthyImmediate
protected final RubySymbol name
protected final int scopeDepth
protected final int offset
protected final int hcode
protected final boolean isOuterScopeVar
public LocalVariable(RubySymbol name, int scopeDepth, int location)
public LocalVariable(RubySymbol name, int scopeDepth, int location, boolean isOuterScopeVar)
public OperandType getOperandType()
getOperandType
in class Operand
public boolean isSameDepth(LocalVariable other)
public int getScopeDepth()
public int getOffset()
public int getLocation()
public RubySymbol getName()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(java.lang.Object arg0)
compareTo
in interface java.lang.Comparable
public java.lang.Object retrieve(ThreadContext context, IRubyObject self, StaticScope currScope, DynamicScope currDynScope, java.lang.Object[] temp)
public Variable clone(SimpleCloneInfo ii)
public LocalVariable cloneForDepth(int n)
DepthCloneable
cloneForDepth
in interface DepthCloneable
public boolean isOuterScopeVar()
public void encode(IRWriterEncoder e)
public static LocalVariable decode(IRReaderDecoder d)
Copyright © 2001-2022 JRuby. All Rights Reserved.