5#ifndef HOSHI_LANG_COMPILERCONTEXT_H
6#define HOSHI_LANG_COMPILERCONTEXT_H
9#include <compiler/builtinModule.hoshi>
24 class IRStructDefinition;
34 class BuiltinModuleBuilder;
97 std::shared_ptr<yoi::IRValueType>
getIntObjectType(
bool forceRawAttr =
false);
103 std::shared_ptr<yoi::IRValueType>
getStrObjectType(
bool forceRawAttr =
false);
std::shared_ptr< IRBuildConfig > buildConfig
std::shared_ptr< yoi::IRValueType > getForeignFloatObjectType()
std::map< yoi::indexT, std::shared_ptr< IRModule > > moduleImported
const std::map< yoi::indexT, std::shared_ptr< IRModule > > & getCompiledModules() const
std::shared_ptr< moduleContext > builtinModuleContext
bool isInitialized() const
void setIRObjectFile(const std::shared_ptr< IRObjectFile > &irObjectFile)
compilerContext()=default
yoi::indexTable< yoi::wstr, std::shared_ptr< yoi::moduleContext > > modules
std::shared_ptr< yoi::moduleContext > getModuleContext(yoi::indexT index)
get module context by index
std::shared_ptr< yoi::IRValueType > getCharObjectType(bool forceRawAttr=false)
void registerModule(yoi::indexT idx, std::shared_ptr< IRModule > mod)
std::shared_ptr< yoi::IRValueType > getNullInterfaceType()
void setBuildConfig(const std::shared_ptr< IRBuildConfig > &buildConfig)
std::set< hoshiModule * > astToFinalize
std::shared_ptr< yoi::IRValueType > getPointerType()
const std::shared_ptr< IRObjectFile > & getIRObjectFile() const
std::shared_ptr< yoi::IRValueType > getBoolObjectType(bool forceRawAttr=false)
std::shared_ptr< DiagnosticEngine > getDiagnosticEngine() const
yoi::indexT getModuleIndexByRealPath(const yoi::wstr &modRealPath)
std::shared_ptr< yoi::IRValueType > getUnsignedObjectType(bool forceRawAttr=false)
std::shared_ptr< IRFFITable > getIRFFITable()
std::shared_ptr< yoi::IRValueType > getForeignInt32ObjectType()
std::shared_ptr< yoi::IRValueType > getShortObjectType(bool forceRawAttr=false)
std::shared_ptr< yoi::IRValueType > getNoneObjectType()
yoi::indexT compileModule(const yoi::wstr &filepath)
void initializeSharedObjects()
std::shared_ptr< yoi::IRValueType > getIntObjectType(bool forceRawAttr=false)
std::shared_ptr< IRObjectFile > irObjectFile
std::shared_ptr< IRFFITable > irFFITable
std::shared_ptr< IRModule > getImportedModule(yoi::indexT index)
std::shared_ptr< BuiltinModuleBuilder > builtinModuleBuilder
void setDiagnosticEngine(const std::shared_ptr< DiagnosticEngine > &engine)
std::shared_ptr< IRBuildConfig > getBuildConfig() const
compilerContext(const compilerContext &context)=default
yoi::indexTable< yoi::wstr, std::shared_ptr< IRValueType > > sharedValueType
std::shared_ptr< yoi::IRValueType > getDeciObjectType(bool forceRawAttr=false)
yoi::IRValueType normalizeForeignBasicType(const std::shared_ptr< yoi::IRValueType > &type, bool handlePointer=true)
std::shared_ptr< yoi::IRValueType > getStrObjectType(bool forceRawAttr=false)
std::shared_ptr< DiagnosticEngine > diagnosticEngine
static const char * __yoi_builtin_module_hoshi