class

Specializer

Inherits Reference < Object

Constructors

new(env : TypeEnv, main_def : FunctionDef)

def initialize(@env : TypeEnv, main_func : Ast::Function) @env = env main_def = env.function_defs[main_func.name][0] get_or_make_function(Location.zero, main_def, Slice(Type).empty, 0) end

Source
new(env : TypeEnv)
Source

Instance methods

env=(env : TypeEnv)
Source
find_function?(function_def : FunctionDef, type_args : Slice(Type)) : Function | Nil
Source
functions
Source
functions=(functions : Hash(String, Array(Function)))
Source
get_or_make_function(location : Location, function_def : FunctionDef, type_args : Slice(Type)) : Function

If the function already exists, just return it. Otherwise, insert it into the map and queue it for processing (unless it is an extern function, in which case there is no need to process it)

Source
new_function(function_def : FunctionDef, type_args : Slice(Type))
Source
queue
Source
queue=(queue : Array(Function))
Source