Next: SaM Program
Up: Internal Simulator Classes
Previous: SaM Symbol Table
Contents
Index
(CORE/REFERENCETABLE.JAVA, CORE/SAMREFERENCETABLE.JAVA)
Introduced in SaM 2.4, the reference table maps symbols to places
in the program where they are used. This sets the stage for future
work on dynamic linking, where reference resolution is performed at
linking time. Currently the reference table is used only during assembly.
The reference table provides the following methods:
- void add(String symbol, int ref_address) - add a reference to Symbol
at the specified address
- void deleteSymbol(String symbol) - delete all references to the given
symbol
- Collection<Integer> getReferences(String symbol) - return a collection
of references for this symbol
- int size() - return the number of symbols in the reference table
- String toString() - return a string representation of this table
David Levitan
2006-02-12