typedefInfo = SymtabEntry.getVariableKey ();
Hashtable tempST = (Hashtable)symbolTable.clone ();
for (Enumeration e = tempST.elements (); e.hasMoreElements ();)
{
SymtabEntry element = (SymtabEntry)e.nextElement ();
// Any other symbolTable processing?
preEmitSTElement (element);
}
// Do this processing AFTER any other processing to get the
// correct names.
Enumeration elements = symbolTable.elements ();
while (elements.hasMoreElements ())
{
// Find all TypedefEntry's and fill in the SymtabEntry.info
// field with it's real type , including [][]... with const
// exprs.
SymtabEntry element = (SymtabEntry)elements.nextElement ();
if (element instanceof TypedefEntry || element instanceof SequenceEntry)
Util.fillInfo (element);
// <d59437> Members of constructed types may now be value boxes, and value
// boxes may contain types that are directly defined rather than typedef-ed
// (e.g., "valuetype vb sequence <long, 5>;"). If member resolves to a value
// box, then check and fillInfo() for value box and its content type BEFORE
// doing fillInfo() on member; otherwise, could get an exception. There's
// code in fillInfo() that performs this check, so it does not appear here.
else if (element instanceof StructEntry)
{
Enumeration members = ((StructEntry)element).members ().elements ();
while (members.hasMoreElements ())
Util.fillInfo ((SymtabEntry)members.nextElement ());
}
else if (element instanceof InterfaceEntry && ((InterfaceEntry)element).state () != null)
{
Enumeration members = ((InterfaceEntry)element).state ().elements ();
while (members.hasMoreElements ())
Util.fillInfo (((InterfaceState)members.nextElement ()).entry);
}
else if (element instanceof UnionEntry)
{
Enumeration branches = ((UnionEntry)element).branches ().elements ();
while (branches.hasMoreElements ())
Util.fillInfo (((UnionBranch)branches.nextElement ()).typedef);
}
// For each type that is at the top level that is NOT a module
// or IncludeEntry, add it to the imports list. If there are
// types within modules which refer to these, their types must
// be explicitly stated in an import statement.
if (element.module ().equals ("") && !(element instanceof ModuleEntry || element instanceof IncludeEntry || element instanceof PrimitiveEntry))
importTypes.addElement (element);
}
while (emitList.hasMoreElements ())
{
SymtabEntry entry = (SymtabEntry)emitList.nextElement ();
// Any other emitList processing:
preEmitELElement (entry);
}
} // preEmit