Specializes each Parser and Control by substituting type arguments and constructor parameters. More...

Public Member Functions | |
| SpecializeAll (ReferenceMap *refMap, TypeMap *typeMap, FrontEndPolicy *policy) | |
Specializes each Parser and Control by substituting type arguments and constructor parameters.
The primary goal of this pass is to specialize Control and Parser types with instantiations that supply constructor parameters, which is accomplished via Specialize.
This is an iterative process, however: Specialize will only substitute constant values for constructor parameters, but constructor calls may have (a) expressions and (b) other constructor parameters as arguments. Hence, each iteration applies constant folding and then specialization until reaching convergence.
Eventually, all instantiations of Control or Parser type declarations with constructor parameters will be replaced by instantiations of specialized type declarations, at which point it is safe to remove the original (now unused) type declarations.