module Savi::Compiler::PreSubtyping

Overview

The purpose of the PreSubtyping pass is to take note of which types are asserted to be subtypes of which others, and to guess about which types might possibly be subtypes of others. Both assertions and guesses will need to be proven later, but this pass provides the space within which such proof is worth calculating. Any type pair not noticed here will be later rejected out of hand as not possibly having a subtype relationship.

This pass does not mutate the Program topology. This pass does not mutate ASTs. This pass does not raise any compilation errors. This pass keeps temporary state at the per-function level. This pass produces output state at the per-function level.

Defined in:

savi/compiler/pre_subtyping.cr