Gyoji Compiler
|
Resolves all functions found in the MIR. More...
#include <function-resolver.hpp>
Public Member Functions | |
FunctionResolver (Gyoji::context::CompilerContext &_compiler_context, const Gyoji::frontend::ParseResult &_parse_result, Gyoji::mir::MIR &_mir, TypeResolver &_type_resolver) | |
Construct a definition resolver. Constructs a function resolver using the compiler context, parse result, and an MIR to act as the destination of the parse. This makes use of the TypeResolver which will already have been used to extract type information from the translation unit. | |
~FunctionResolver () | |
Move along, nothing to see here. | |
bool | resolve () |
Resolves all functions found in the MIR.
This is the 'lowering' process for functions. It reads the parse result syntax tree and constructs functions and the "BasicBlock" control-flow graph in order to produce the MIR which can later drive semantic analysis like borrow checking and then code-generation.
This process is mainly performed by using one FunctionDefinitionResolver for each function found in the translation unit.
FunctionResolver::~FunctionResolver | ( | ) |
Move along, nothing to see here.
Move along, nothing to see here.
bool FunctionResolver::resolve | ( | ) |
Iterates all of the functions in the translation unit given by the parse result and lowers each one of them, inserting the results into the MIR.