class Savi::Compiler::TSubtypingCache

Overview

This is not really a compiler pass!

This is a cache layer that lets us cache some computations that depend on other compiler passes, but there is no point when this pass gets "run".

Instead it is merely leveraged by other passes incrementally and as needed at any point in time after the passes it depends on have been completed.

Because of this, we should ensure every operation exposed by this class is strictly a cache, and not treated like a repository of analysis that can ever be "completed", like the true compiler passes are.

This cache depends on the following passes, and thus can be used at any time after these passes have completed and made their analysis fully available:

Defined in:

savi/compiler/t_subtyping_cache.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def for_rf(rf : ReifiedFunction) #

[View source]
def for_rt(rt : ReifiedType) #

TODO Make these private?


[View source]
def is_subtype_of?(ctx, sub_rt : ReifiedType, super_rt : ReifiedType) : Bool #

[View source]