5#ifndef HOSHI_LANG_IRLINKER_HPP
6#define HOSHI_LANG_IRLINKER_HPP
12#define ENTRY_MODULE_ID_CONST 0xe1751a00
57 std::tuple<IRValueType::valueType, indexT, indexT>
58 patchUniqueKey(
const std::tuple<IRValueType::valueType, indexT, indexT> &key);
60 std::shared_ptr<IRValueType>
patchType(
const std::shared_ptr<IRValueType> &oldType);
std::map< indexT, std::map< indexT, indexT > > datastructRemapping
yoi::vec< yoi::indexT > globInitializerIndexes
void linkInterfaceImplementations()
void linkStringLiterals()
void linkStructsAndInterfaces()
wstr mangleName(indexT moduleId, const wstr &originalName)
Mangles a symbol name with its module ID, unless it's the main function in the entry module.
std::map< indexT, std::map< indexT, indexT > > structRemapping
std::map< indexT, std::map< indexT, indexT > > globalRemapping
std::shared_ptr< IRObjectFile > link(const std::shared_ptr< compilerContext > &context, indexT entryModuleId)
Links all compiled modules from the context into a single IRObjectFile.
std::map< indexT, std::map< indexT, indexT > > interfaceImplRemapping
std::tuple< IRValueType::valueType, indexT, indexT > patchUniqueKey(const std::tuple< IRValueType::valueType, indexT, indexT > &key)
std::map< indexT, std::map< indexT, indexT > > interfaceRemapping
void createEntryFunction()
std::shared_ptr< IRModule > finalModule
IR patchInstruction(const IR &instr, indexT currentModuleId)
std::shared_ptr< compilerContext > compilerCtx
std::map< indexT, std::map< indexT, indexT > > functionRemapping
std::shared_ptr< IRValueType > patchType(const std::shared_ptr< IRValueType > &oldType)
std::map< indexT, std::map< indexT, indexT > > stringRemapping