Within a bytecode file, the names used to refer to things are numbers: indexes into tables.  When we load a file, the position of these objects in thier tables change, so we need to resolve the objects names to thier new positions.

For most types of objects, the list in the file is simply appended to the list we maintain in memory, so the new names can be determined simply by adding an offset.  We store this offset along with the size of the original table in the description of the current module pointed to by the 'CM' pointer.  Whenever we load the name of such an object with the appropriate Get function, we compare the index in the file to the size of original table to insure it is a legal reference, and then add the offset to the index.  Things renamed in this manner are:

Local Kinds
Type Skeletons
Local Constants
Hidden Constants
Strings
Implication Goals
Hash Tables
Bound Variable Tables
Instruction Code

For some objects the new names are arbitrary.  For these objects we create a map from the old names to the new and store this with thier table's size in CM.  For these objects, we check that they are legal and then replace them with the name listed in the map.  Things renamed this way are:

Global Kinds
Global Constants
Import Tables

