public class SymbolTable extends Object implements Cloneable
SSABuilder
.Constructor and Description |
---|
SymbolTable(int numberOfParameters) |
Modifier and Type | Method and Description |
---|---|
SymbolTable |
copy() |
void |
ensureSymbol(int i)
ensure that the symbol table has allocated space for the particular value number
|
int |
getConstant(boolean b) |
int |
getConstant(double d) |
int |
getConstant(float f) |
int |
getConstant(int i) |
int |
getConstant(long l) |
int |
getConstant(String s) |
Object |
getConstantValue(int v) |
int |
getDefaultValue(int vn) |
double |
getDoubleValue(int v) |
float |
getFloatValue(int v) |
int |
getIntValue(int v) |
long |
getLongValue(int v) |
int |
getMaxValueNumber() |
int |
getNullConstant() |
int |
getNumberOfParameters() |
int |
getParameter(int i)
Return the value number of the ith parameter
By convention, for a non-static method, the 0th parameter is 'this'
|
int[] |
getParameterValueNumbers() |
PhiValue |
getPhiValue(int valueNumber)
Return the PhiValue that is associated with a given value number
|
String |
getStringValue(int v) |
Value |
getValue(int valueNumber) |
String |
getValueString(int valueNumber) |
boolean |
isBooleanConstant(int v) |
boolean |
isBooleanOrZeroOneConstant(int v) |
boolean |
isConstant(int v) |
boolean |
isDoubleConstant(int v) |
boolean |
isFalse(int v) |
boolean |
isFloatConstant(int v) |
boolean |
isIntegerConstant(int v) |
boolean |
isLongConstant(int v) |
boolean |
isNullConstant(int v) |
boolean |
isNumberConstant(int v) |
boolean |
isOne(int v) |
boolean |
isOneOrTrue(int v) |
boolean |
isParameter(int valueNumber) |
boolean |
isStringConstant(int v) |
boolean |
isTrue(int v) |
boolean |
isZero(int v) |
boolean |
isZeroOrFalse(int v) |
int |
newPhi(int[] rhs) |
int |
newSymbol()
Method newSymbol.
|
void |
setConstantValue(int vn,
ConstantValue val) |
void |
setDefaultValue(int vn,
Object defaultValue)
Set the default value for a value number.
|
public SymbolTable(int numberOfParameters)
numberOfParameters
- in the IR .. should be ir.getNumberOfParameters()public int newSymbol()
public void setConstantValue(int vn, ConstantValue val)
public void setDefaultValue(int vn, Object defaultValue)
public int getDefaultValue(int vn)
public int getNullConstant()
public int getConstant(boolean b)
public int getConstant(int i)
public int getConstant(long l)
public int getConstant(float f)
public int getConstant(double d)
public int getConstant(String s)
public int getParameter(int i) throws IllegalArgumentException
IllegalArgumentException
public void ensureSymbol(int i)
i
- a value numberpublic String getValueString(int valueNumber)
public boolean isConstant(int v)
public boolean isZero(int v)
public boolean isOne(int v)
public boolean isTrue(int v)
public boolean isZeroOrFalse(int v)
public boolean isOneOrTrue(int v)
public boolean isFalse(int v)
public boolean isBooleanOrZeroOneConstant(int v)
public boolean isBooleanConstant(int v)
public boolean isIntegerConstant(int v)
public boolean isLongConstant(int v)
public boolean isFloatConstant(int v)
public boolean isDoubleConstant(int v)
public boolean isNumberConstant(int v)
public boolean isStringConstant(int v)
public boolean isNullConstant(int v)
public int newPhi(int[] rhs) throws IllegalArgumentException
IllegalArgumentException
- if rhs is nullpublic PhiValue getPhiValue(int valueNumber)
public int getMaxValueNumber()
public int[] getParameterValueNumbers()
public int getNumberOfParameters()
public String getStringValue(int v) throws IllegalArgumentException
IllegalArgumentException
public float getFloatValue(int v) throws IllegalArgumentException
IllegalArgumentException
public double getDoubleValue(int v) throws IllegalArgumentException
IllegalArgumentException
public int getIntValue(int v) throws IllegalArgumentException
IllegalArgumentException
public long getLongValue(int v) throws IllegalArgumentException
IllegalArgumentException
public Object getConstantValue(int v) throws IllegalArgumentException
IllegalArgumentException
public Value getValue(int valueNumber)
public boolean isParameter(int valueNumber)
valueNumber
- public SymbolTable copy()