module Savi::Compiler::PreTInfer

Overview

The purpose of the PreTInfer pass is to build a topology of TInfer::Info objects so that the later TInfer pass can use these to infer/resolve types. While the TInfer pass operates on reified functions and reified types (taking type parameters and other type context into account), this pass is restricted to building out info outside of any broader type context, allowing the info to be reused for different reifications of the same func. This pass also has a handful of compile errors that might be raised if there are problems with the function that prevent building out the topology.

This pass does not mutate the Program topology. This pass does not mutate the AST. This pass may raise a compilation error. This pass keeps state at the per-function level. This pass produces output state at the per-function level.

Defined in:

savi/compiler/pre_t_infer.cr