Expand description
Generic function specialization pass.
This module provides the specialization pass that transforms CallGeneric
instructions into regular Call instructions by:
- Collecting all
CallGenericinstructions in the analyzed functions - For each unique (func_name, type_args) combination, creating a specialized function
- Rewriting
CallGenerictoCallwith the specialized function name
§Architecture
The specialization pass runs after semantic analysis but before CFG building. It transforms the AIR in-place and adds new specialized functions to the output.
Structs§
- Specialization
Key - A key for a specialized function: (base_function_name, type_arguments).
Functions§
- specialize
- Perform the specialization pass on the sema output.