gccint: Containers

1 
1 11.2.3 Containers
1 -----------------
1 
1 Two common container data structures can be represented directly with
1 tree nodes.  A 'TREE_LIST' is a singly linked list containing two trees
1 per node.  These are the 'TREE_PURPOSE' and 'TREE_VALUE' of each node.
1 (Often, the 'TREE_PURPOSE' contains some kind of tag, or additional
1 information, while the 'TREE_VALUE' contains the majority of the
1 payload.  In other cases, the 'TREE_PURPOSE' is simply 'NULL_TREE',
1 while in still others both the 'TREE_PURPOSE' and 'TREE_VALUE' are of
1 equal stature.)  Given one 'TREE_LIST' node, the next node is found by
1 following the 'TREE_CHAIN'.  If the 'TREE_CHAIN' is 'NULL_TREE', then
1 you have reached the end of the list.
1 
1  A 'TREE_VEC' is a simple vector.  The 'TREE_VEC_LENGTH' is an integer
1 (not a tree) giving the number of nodes in the vector.  The nodes
1 themselves are accessed using the 'TREE_VEC_ELT' macro, which takes two
1 arguments.  The first is the 'TREE_VEC' in question; the second is an
1 integer indicating which element in the vector is desired.  The elements
1 are indexed from zero.
1