|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object SymbolTableEntry VariableEntry
VariableEntry extends SymbolTableEntry by adding data fields to support variables and parameters. It has a boolean field indicating if this is a reference-type symbol. Reference-type symbols are definable in programming languages with explicitly declared pointer types and/or call-by-reference parameters.
VariableEntry also has an integer memory location field. This can be either an absolute address, or a relative offset, e.g., in a stack frame.
Field Summary | |
boolean |
isRef
True if this is a reference variable or parameter. |
int |
memoryLocation
Memory location |
Fields inherited from class SymbolTableEntry |
name, type |
Constructor Summary | |
VariableEntry()
Construct this with null data fields. |
|
VariableEntry(java.lang.String name,
TreeNode type,
boolean isRef,
int memoryLocation)
Construct this with the given data field values. |
Method Summary | |
java.lang.String |
toString(int level)
Return the string rep of this, which consists of the return value of super.toString, plus the values of this.isRef and this.memoryLocation. |
Methods inherited from class SymbolTableEntry |
doToString, indentString, toString, toStringDeep, toStringDeep |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public boolean isRef
public int memoryLocation
Constructor Detail |
public VariableEntry()
public VariableEntry(java.lang.String name, TreeNode type, boolean isRef, int memoryLocation)
Method Detail |
public java.lang.String toString(int level)
toString
in class SymbolTableEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |