class FIND_TYPES < $FIND_TYPES
****
This is the phase which finds all possible types in the program. It starts from the non-parameterized types parsed in the first phase. It produces an IMPL for each such type and determines all types mentioned within it. If any of these types is missing or if any of the builtin types is missing an error is signalled and compilation ends. It causes errors for overloaded name conflicts.


Flattened version is here

Ancestors
$FIND_TYPES CS_COMPONENT



Public


Features
create(p:PROG):SAME
do_include( inc_type: AS_TYPE_SPEC )
**** Processing an include clause. 1.) Trying to load the syntax tree of the included type.
_____Checking_against_cyclic_inclusion.
2.) If included type is parameterized: 2a) Resolving the actual type parameters.
_____This_is_done_even_if_the_syntax_tree_was_not_found.
2b) Retrieving the formal type parameters. 3.) Creating a new context for the syntax tree. 4.) Processing the tree. 5.) Restoring the old context.
find_types
**** Walk through all the code trees and find all the types referred to and put them in `tp_done'. Cause errors for any types referred to but not existing.


Private

attr con:TP_CONTEXT;
**** Context in which to interpret types.
attr con:TP_CONTEXT;
**** Context in which to interpret types.
cycle_error
do_tps(as:$AS_NODE)
**** Find all the types mentioned in `as' and interpret them via `con'. INCLUDE_CLAUSEs are treated specially.
shared pending_includes: FLIST{TUP{IDENT,INT}};
shared pending_includes: FLIST{TUP{IDENT,INT}};
process_tp(t:$TP)
**** Looks up, whether there is a tree for this class. ROUTs and ITERs are completely checked and marked as done. CLASSes are only marked in the find_types loop!
tree_for(nm:IDENT, num:INT):AS_CLASS_DEF
**** Return the code tree for the class with name `nm' and the number of type parameters `num'. Return void if no such class.