Expand description

This implements an algorithm that detects loops during the instantiation of generics.

It builds a graph from the given CompiledModule and converts the original problem into finding strongly connected components in the graph with certain properties. Read the documentation of the types/functions below for details of how it works.

Note: We’re doing generics only up to specialization, and are doing a conservative check of generic call sites to eliminate those which could lead to an infinite number of specialized instances. We do reject recursive functions that create a new type upon each call but do terminate eventually.

Structs