fmrisc.Semantics
Class ValueTableEntry

java.lang.Object
  extended byfmrisc.Semantics.SymbolTableEntryBase
      extended byfmrisc.Semantics.ValueTableEntry
All Implemented Interfaces:
SymbolTableEntry

public final class ValueTableEntry
extends SymbolTableEntryBase

Entries in ValueTable.


Constructor Summary
ValueTableEntry(ValueDeclIdentifier ident)
          construct value table entry from ident type and value are both null
 
Method Summary
 int getDepth()
          return environment depth of entry
 Type getType()
          return type of entry
 Expression getValue()
          return value of entry
 ValueDeclIdentifier getValueDeclIdentifier()
          return identifier of entry
 int getVarNumber()
          return variable number of entry
 void instantiate(ValueTableEntry entry)
          instantiate entry with copy of denoted entry the identifier is *not* copied from the denoted entry
 void setDepth(int depth)
          set environment depth of entry
 void setType(Type type)
          set type of entry
 void setValue(Expression value)
          set value of entry
 void setVarNumber(int varNumber)
          set variable number of entry
 
Methods inherited from class fmrisc.Semantics.SymbolTableEntryBase
getIdentifier
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueTableEntry

public ValueTableEntry(ValueDeclIdentifier ident)
construct value table entry from ident type and value are both null

Method Detail

getValueDeclIdentifier

public ValueDeclIdentifier getValueDeclIdentifier()
return identifier of entry

Returns:
the entry identifier

getType

public Type getType()
return type of entry

Returns:
the entry type

getValue

public Expression getValue()
return value of entry

Returns:
the entry value (may be null)

getDepth

public int getDepth()
return environment depth of entry

Returns:
the environment depth

getVarNumber

public int getVarNumber()
return variable number of entry

Returns:
the variable number (only if depth > 0)

setType

public void setType(Type type)
set type of entry

Parameters:
type - the entry type

setValue

public void setValue(Expression value)
set value of entry

Parameters:
value - the entry value

setDepth

public void setDepth(int depth)
set environment depth of entry

Parameters:
depth - the entry environment depth

setVarNumber

public void setVarNumber(int varNumber)
set variable number of entry

Parameters:
varNumber - variable number of entry

instantiate

public void instantiate(ValueTableEntry entry)
instantiate entry with copy of denoted entry the identifier is *not* copied from the denoted entry

Parameters:
entry - the entry from which the instantiation is derived