Prev: The GD Format Table of Contents Next: Source Tree Layout


4. The Transforms

This section describes each of the transforms in the CPPX transform engine.

4.1 Transform Order

The transforms are applied in the following order:

   gd_reduce gd_builtin namespace aggregate gd_filter gd_alias funct_type
   gd_derived gd_enum gd_objects gd_func gd_literals gd_operators gd_actuals
   gd_break gd_goto gd_return gd_labels gd_for gd_while gd_if gd_switch gd_block
   gd_statements gd_nameref classes gd_typedecls ordinals gd_filter merge_builtin
   zap_builtin zap_other gd_filter

4.4 General Transform Approach

While some of the transforms will walk the graph, most do a simple linear pass over the nodes, and only do limited graph traversals.  Thus a typical algorithm might be:

    for each node in the graph
       if the node type is the one I want
         -- do something.

This leads to very fast transforms. However, it also means that the garbage collector needs to be invoked on a more frequent basis, because nodes cut off from the main graph retain thier node type and may influence part of a transform unless specifically collected by the gd_filter.

4.3 Transforms

4.3 Auxilary Files

There are several auxilary files:
Prev: The GD Format Table of Contents Next: Source Tree Layout