|
hoshi-lang dev
Yet another programming language
|
#include <llvmCodegenContext.hpp>

Classes | |
| struct | ControlFlowAnalysis |
| class | LLVMModuleContext |
| struct | StackValue |
| Stack Value struct exposed to original code base for compatibility. More... | |
| struct | ValueStackWithPhi |
Public Member Functions | |
| LLVMCodegen (std::shared_ptr< compilerContext > compilerCtx, const std::shared_ptr< IRModule > &yoiModule) | |
| yoi::vec< yoi::wstr > | generate () |
| void | dumpIR (const yoi::wstr &modulePath, const std::string &filename) |
Private Member Functions | |
| void | generate (LLVMModuleContext &llvmModCtx) |
| llvm::Module * | getModule (LLVMModuleContext &llvmModCtx) |
| void | declareRuntimeFunctions (LLVMModuleContext &llvmModCtx) |
| void | generateRuntimeFunctionImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateBasicTypeDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateBasicTypeImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateStructShallowDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateDataStructShallowDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateGlobalDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateGlobalInitializers (LLVMModuleContext &llvmModCtx) |
| void | generateFunctionDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateImportFunctionDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateStructDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateDataStructDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateStructGCFunctionDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateStructGCFunctionImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateInterfaceObjectGCFunctionDeclarations (LLVMModuleContext &llvmModCtx) |
| void | generateInterfaceObjectGCFunctionImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateForeignStructTypes (LLVMModuleContext &llvmModCtx) |
| void | generateExportFunctionDecls (LLVMModuleContext &llvmModCtx) |
| void | generateImportFunctionImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateMainFunction (LLVMModuleContext &llvmModCtx) |
| void | generateWrapperForForeignCallablesIfNotExists (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type) |
| void | generateFunctionImplementations (LLVMModuleContext &llvmModCtx) |
| void | generateFunction (LLVMModuleContext &llvmModCtx, IRFunctionDefinition &funcDef) |
| void | generateFunctionExitCleanup (LLVMModuleContext &llvmModCtx) |
| void | generateCodeBlock (LLVMModuleContext &llvmModCtx, IRCodeBlock &block, yoi::indexT fromBlock, yoi::indexT toBlock, llvm::BasicBlock *actualFromBlock=nullptr) |
| void | generateInstruction (LLVMModuleContext &llvmModCtx, const IR &instr, yoi::indexT fromBlock, yoi::indexT toBlock) |
| void | generateDescription (LLVMModuleContext &llvmModCtx) |
| void | generateRTTIDeclaration (LLVMModuleContext &llvmModCtx) |
| void | generateRTTIImplmentation (LLVMModuleContext &llvmModCtx) |
| void | generateGeneratorContextInitialization (LLVMModuleContext &llvmModCtx) |
| llvm::Value * | createGeneratorContext (LLVMModuleContext &llvmModCtx, llvm::Value *coro_handle) |
| void | storeYieldValue (LLVMModuleContext &llvmModCtx, llvm::Value *value, const std::shared_ptr< IRValueType > &yoiType) |
| void | storeMember (LLVMModuleContext &llvmModCtx, const StackValue &storeValue, const StackValue &structVal, yoi::indexT memberIndex) |
| llvm::Value * | createStructObject (LLVMModuleContext &llvmModCtx, yoi::indexT moduleIndex, yoi::indexT structIndex) |
| llvm::Function * | getLLVMCoroIntrinsic (LLVMModuleContext &llvmModCtx, llvm::Intrinsic::ID Id, llvm::ArrayRef< llvm::Type * > Types={}) |
| llvm::Value * | loadIfDataStructObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::Value *value) |
| std::shared_ptr< IRValueType > | normalizeForeignType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type) |
| llvm::Type * | yoiTypeToLLVMType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, bool enforceForeignType=false) |
| llvm::Type * | getArrayLLVMType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, bool enforceForeignType=false) |
| llvm::Type * | getDynamicArrayLLVMType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, bool enforceForeignType=false) |
| void | generateArrayGCFunctionDeclarations (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::StructType *structType, llvm::Type *baseType) |
| llvm::FunctionType * | getFunctionType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRFunctionDefinition > &funcDef) |
| llvm::Constant * | getGlobalInitializer (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type) |
| void | handleBinaryOp (LLVMModuleContext &llvmModCtx, llvm::Instruction::BinaryOps op, bool isFloat, yoi::indexT fromBlock, yoi::indexT toBlock) |
| void | handleComparison (LLVMModuleContext &llvmModCtx, llvm::CmpInst::Predicate pred, bool isFloat, yoi::indexT fromBlock, yoi::indexT toBlock) |
| llvm::Value * | createBasicObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &yoiType, llvm::Value *rawValue) |
| llvm::Value * | unboxValue (LLVMModuleContext &llvmModCtx, llvm::Value *objectPtr, const std::shared_ptr< IRValueType > &yoiType) |
| llvm::Value * | loadArrayElement (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::Value *arrayPtr, llvm::Value *index) |
| llvm::Function * | getGcFunction (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &yoiType, bool isIncrease) |
| void | callGcFunction (LLVMModuleContext &llvmModCtx, llvm::Value *objectPtr, const std::shared_ptr< IRValueType > &yoiType, bool isIncrease, bool forceForPermanent=false, bool forceForBorrow=false) |
| llvm::Value * | handleForeignTypeConv (LLVMModuleContext &llvmModCtx, llvm::Value *val, yoi::indexT foreignTypeIndex, yoi::indexT isArray, bool convertToForeign=false) |
| llvm::Value * | handleForeignTypeConv (LLVMModuleContext &llvmModCtx, llvm::Value *val, const std::shared_ptr< IRValueType > &foreignType, bool convertToForeign=false) |
| llvm::Value * | createArrayObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, const yoi::vec< StackValue > &elements) |
| llvm::DIType * | getDIType (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type) |
| llvm::Value * | createDynamicArrayObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, const yoi::vec< StackValue > &elements, llvm::Value *size) |
| void | storeArrayElement (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, const std::shared_ptr< IRValueType > &valueToStoreType, llvm::Value *arrayPtr, llvm::Value *index, llvm::Value *value) |
| void | generateArrayGCFunctionImplementations (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::StructType *structType, llvm::Type *baseType) |
| std::pair< std::shared_ptr< IRValueType >, llvm::Value * > | ensureObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::Value *val) |
| void | generateIfTargetNotNull (LLVMModuleContext &llvmModCtx, llvm::Value *objectPtr, const std::shared_ptr< IRValueType > &yoiType, const std::function< void()> &func, bool enforced=false) |
| StackValue | actualizeInterfaceObject (LLVMModuleContext &llvmModCtx, const std::shared_ptr< IRValueType > &type, llvm::Value *objectPtr, yoi::indexT implIndex) |
| StackValue | wrapInterfaceObjectIfRegressed (LLVMModuleContext &llvmModCtx, const StackValue &objectVal) |
| llvm::Value * | unwrapInterfaceObject (LLVMModuleContext &llvmModCtx, const StackValue &objectVal) |
| StackValue | promiseInterfaceObjectIfInterface (LLVMModuleContext &llvmModCtx, const StackValue &objectVal) |
| void | handleIntrinsicCall (LLVMModuleContext &llvmModCtx, const IR &instr) |
| LLVMModuleContext & | getLLVMModuleContext (const yoi::wstr &absolutePath) |
| void | generateTargetObjectCode (LLVMModuleContext &llvmModCtx, const yoi::wstr &pathToOutput) |
Private Attributes | |
| CodegenObjectCache | codegenObjectCache |
| CodegenTaskDispatcher | codegenTaskDispatcher |
| std::shared_ptr< compilerContext > | compilerCtx |
| std::shared_ptr< IRModule > | yoiModule |
| std::mutex | contextMutex |
| std::map< yoi::wstr, std::unique_ptr< LLVMModuleContext > > | llvmModuleContext |
| bool | is_rtti_table_frozen = false |
Definition at line 37 of file llvmCodegenContext.hpp.
| LLVMCodegen | ( | std::shared_ptr< compilerContext > | compilerCtx, |
| const std::shared_ptr< IRModule > & | yoiModule | ||
| ) |
Definition at line 45 of file llvmCodegenContext.cpp.
References LLVMCodegen::codegenObjectCache, CodegenObjectCache::purge_and_update(), yoi::serialization::read(), CodegenObjectCache::setCompilerCtx(), and yoi::yoi_assert().

|
private |
Definition at line 4258 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::callGcFunction(), LLVMCodegen::ensureObject(), LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::getGcFunction(), IRValueType::interfaceObject, yoi::managedPtr(), IRValueType::PermanentInCurrentScope, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::typeIDMap, IRValueType::virtualMethod, yoi::yoi_assert(), and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::wrapInterfaceObjectIfRegressed().


|
private |
Definition at line 4575 of file llvmCodegenContext.cpp.
References IRValueType::Borrow, LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::generateIfTargetNotNull(), LLVMCodegen::getGcFunction(), IRValueType::none, IRValueType::PermanentInCurrentScope, and IRValueType::Raw.
Referenced by LLVMCodegen::actualizeInterfaceObject(), LLVMCodegen::generateStructGCFunctionImplementations(), and LLVMCodegen::storeMember().


|
private |
Definition at line 3232 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::typeIDMap, and yoi::yoi_assert().

|
private |
Definition at line 2510 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and LLVMCodegen::LLVMModuleContext::typeIDMap.
|
private |
Definition at line 3892 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::arrayTypeMap, LLVMCodegen::LLVMModuleContext::Builder, yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::typeIDMap, and yoi::yoi_assert().

|
private |
Definition at line 4713 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::compilerCtx, LLVMCodegen::createStructObject(), LLVMCodegen::LLVMModuleContext::currentFunctionDef, yoi::managedPtr(), IRValueType::Raw, LLVMCodegen::storeMember(), IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateGeneratorContextInitialization().


|
private |
Definition at line 4735 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::runtimeFunctions, IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::typeIDMap, and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::createGeneratorContext().

|
private |
Definition at line 69 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::compilerCtx, LLVMCodegen::LLVMModuleContext::compileUnits, LLVMCodegen::LLVMModuleContext::DBuilder, IRBuildConfig::debug, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::LLVMModuleContext::TheModule.
Referenced by LLVMCodegen::generateDeclarations().

| void dumpIR | ( | const yoi::wstr & | modulePath, |
| const std::string & | filename | ||
| ) |
Definition at line 4564 of file llvmCodegenContext.cpp.
References LLVMCodegen::llvmModuleContext.
Referenced by LLVMCodegen::generate(), and main().

|
private |
Definition at line 4102 of file llvmCodegenContext.cpp.
References yoi::managedPtr().
Referenced by LLVMCodegen::actualizeInterfaceObject(), and LLVMCodegen::storeMember().


Definition at line 4448 of file llvmCodegenContext.cpp.
References LLVMCodegen::codegenObjectCache, LLVMCodegen::codegenTaskDispatcher, LLVMCodegen::compilerCtx, CodegenTaskDispatcher::dispatch(), LLVMCodegen::dumpIR(), LLVMCodegen::generateArrayGCFunctionImplementations(), LLVMCodegen::generateBasicTypeImplementations(), LLVMCodegen::generateDeclarations(), LLVMCodegen::generateDescription(), LLVMCodegen::generateExportFunctionDecls(), LLVMCodegen::generateImplementations(), LLVMCodegen::generateImportFunctionImplementations(), LLVMCodegen::generateMainFunction(), LLVMCodegen::generateRTTIImplmentation(), LLVMCodegen::generateRuntimeFunctionImplementations(), LLVMCodegen::generateTargetObjectCode(), CodegenObjectCache::get_entry(), CodegenObjectCacheEntry::getLastModification(), CodegenObjectCacheEntry::getObjectFilename(), LLVMCodegen::llvmModuleContext, yoi::set_current_file_path(), CodegenObjectCache::update_last_modification(), CodegenTaskDispatcher::wait(), yoi::warning(), yoi::serialization::write(), yoi::wstring2string(), and yoi::yoi_assert().
Referenced by main().


|
private |
Definition at line 169 of file llvmCodegenContext.cpp.
References LLVMCodegen::compilerCtx, LLVMCodegen::LLVMModuleContext::DBuilder, IRBuildConfig::debug, LLVMCodegen::generateDeclarations(), LLVMCodegen::generateDescription(), LLVMCodegen::generateExportFunctionDecls(), LLVMCodegen::generateForeignStructTypes(), LLVMCodegen::generateImplementations(), LLVMCodegen::generateImportFunctionImplementations(), LLVMCodegen::generateMainFunction(), LLVMCodegen::generateRTTIImplmentation(), and TIMER.

|
private |
Definition at line 3940 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().

|
private |
Definition at line 3989 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::TheContext, and yoi::wstring2string().
Referenced by LLVMCodegen::generate().


|
private |
Definition at line 187 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::compilerCtx, LLVMCodegen::LLVMModuleContext::foreignTypeMap, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::getArrayLLVMType(), yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::nextTypeId, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::typeIDMap, and yoi::wstring2string().
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 244 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::compilerCtx, IRBuildConfig::debug, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generateImplementations().


|
private |
Definition at line 859 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::basicBlockMap, LLVMCodegen::LLVMModuleContext::basicBlockVisited, LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::controlFlowAnalysis, LLVMCodegen::LLVMModuleContext::currentFunction, LLVMCodegen::LLVMModuleContext::currentFunctionDef, LLVMCodegen::ValueStackWithPhi::enterNode(), LLVMCodegen::ValueStackWithPhi::finalizeNode(), LLVMCodegen::ControlFlowAnalysis::G, IRCodeBlock::getIRArray(), LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::LLVMModuleContext::valueStackPhi.

|
private |
Definition at line 4613 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, IRValueType::datastructObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::yoiModule, and LLVMCodegen::yoiTypeToLLVMType().
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 4600 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, IRValueType::datastructObject, LLVMCodegen::LLVMModuleContext::nextTypeId, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::typeIDMap, yoi::wstring2string(), and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 327 of file llvmCodegenContext.cpp.
References LLVMCodegen::declareRuntimeFunctions(), LLVMCodegen::generateBasicTypeDeclarations(), LLVMCodegen::generateDataStructDeclarations(), LLVMCodegen::generateDataStructShallowDeclarations(), LLVMCodegen::generateFunctionDeclarations(), LLVMCodegen::generateGlobalDeclarations(), LLVMCodegen::generateImportFunctionDeclarations(), LLVMCodegen::generateInterfaceObjectGCFunctionDeclarations(), LLVMCodegen::generateRTTIDeclaration(), LLVMCodegen::generateStructDeclarations(), LLVMCodegen::generateStructGCFunctionDeclarations(), and LLVMCodegen::generateStructShallowDeclarations().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 2608 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 2714 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, yoi::wstring2string(), and yoi::yoi_assert().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 2695 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::foreignTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, and yoi::wstring2string().
Referenced by LLVMCodegen::generate().


|
private |
Definition at line 680 of file llvmCodegenContext.cpp.
References IRValueType::addAttribute(), IRFunctionDefinition::argumentTypes, LLVMCodegen::LLVMModuleContext::basicBlockMap, LLVMCodegen::LLVMModuleContext::basicBlockVisited, LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::cleanupBB, LLVMCodegen::ValueStackWithPhi::clear(), IRFunctionDefinition::codeBlock, IRDebugInfo::column, LLVMCodegen::LLVMModuleContext::compileUnits, LLVMCodegen::LLVMModuleContext::controlFlowAnalysis, LLVMCodegen::LLVMModuleContext::currentFunction, LLVMCodegen::LLVMModuleContext::currentGeneratorContextBasicBlocks, LLVMCodegen::LLVMModuleContext::DBuilder, IRFunctionDefinition::debugInfo, LLVMCodegen::LLVMModuleContext::functionMap, IRVariableTable::getVariables(), IRFunctionDefinition::getVariableTable(), IRDebugInfo::line, yoi::managedPtr(), IRFunctionDefinition::name, LLVMCodegen::LLVMModuleContext::namedValues, yoi::panic(), IRFunctionDefinition::returnType, LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::set_current_file_path(), IRDebugInfo::sourceFile, LLVMCodegen::LLVMModuleContext::suspendBB, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::LLVMModuleContext::valueStackPhi, and yoi::wstring2string().

|
private |
Definition at line 384 of file llvmCodegenContext.cpp.
References IRFunctionDefinition::AlwaysInline, LLVMCodegen::LLVMModuleContext::functionMap, IRFunctionDefinition::Generator, LLVMCodegen::getFunctionType(), LLVMCodegen::LLVMModuleContext::TheModule, IRFunctionDefinition::Unreachable, yoi::wstring2string(), and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 837 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::currentFunctionDef, and LLVMCodegen::LLVMModuleContext::namedValues.
Referenced by LLVMCodegen::generateGeneratorContextInitialization().

|
private |
Definition at line 664 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::absolute_path, and LLVMCodegen::LLVMModuleContext::currentFunctionDef.
Referenced by LLVMCodegen::generateImplementations().

|
private |
Definition at line 4647 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::cleanupBB, LLVMCodegen::createGeneratorContext(), LLVMCodegen::LLVMModuleContext::currentFunction, LLVMCodegen::LLVMModuleContext::currentFunctionDef, LLVMCodegen::LLVMModuleContext::currentGeneratorContextBasicBlocks, LLVMCodegen::LLVMModuleContext::currentGeneratorContextValue, LLVMCodegen::generateFunctionExitCleanup(), IRFunctionDefinition::Generator, LLVMCodegen::getLLVMCoroIntrinsic(), LLVMCodegen::LLVMModuleContext::namedValues, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::suspendBB, LLVMCodegen::LLVMModuleContext::TheContext, and yoi::yoi_assert().

|
private |
Definition at line 361 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::globalValues, LLVMCodegen::LLVMModuleContext::TheModule, yoi::wstring2string(), LLVMCodegen::yoiModule, and LLVMCodegen::yoiTypeToLLVMType().
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 371 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::absolute_path, LLVMCodegen::compilerCtx, LLVMCodegen::LLVMModuleContext::globalValues, LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateImplementations().

|
private |
Definition at line 4112 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, and LLVMCodegen::LLVMModuleContext::TheContext.
Referenced by LLVMCodegen::callGcFunction().

|
private |
Definition at line 408 of file llvmCodegenContext.cpp.
References LLVMCodegen::generateBasicTypeImplementations(), LLVMCodegen::generateFunctionImplementations(), LLVMCodegen::generateGlobalInitializers(), LLVMCodegen::generateInterfaceObjectGCFunctionImplementations(), LLVMCodegen::generateRuntimeFunctionImplementations(), and LLVMCodegen::generateStructGCFunctionImplementations().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 3031 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 2931 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, yoi::wstring2string(), and yoi::yoi_assert().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 902 of file llvmCodegenContext.cpp.
References IRValueType::addAttribute(), LLVMCodegen::LLVMModuleContext::arrayTypeMap, LLVMCodegen::ValueStackWithPhi::back(), LLVMCodegen::LLVMModuleContext::basicBlockMap, LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::cleanupBB, IRDebugInfo::column, LLVMCodegen::LLVMModuleContext::currentFunction, LLVMCodegen::LLVMModuleContext::currentFunctionDef, LLVMCodegen::LLVMModuleContext::currentGeneratorContextBasicBlocks, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, IR::debugInfo, LLVMCodegen::ValueStackWithPhi::empty(), ENTRY_MODULE_ID_CONST, magic_enum::enum_name(), LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::globalValues, IRDebugInfo::line, LLVMCodegen::StackValue::llvmValue, yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::namedValues, IR::opcode, IR::operands, yoi::panic(), LLVMCodegen::ValueStackWithPhi::pop_back(), LLVMCodegen::ValueStackWithPhi::push_back(), LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::set_current_file_path(), LLVMCodegen::ValueStackWithPhi::size(), IRDebugInfo::sourceFile, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::suspendBB, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, IR::to_string(), LLVMCodegen::LLVMModuleContext::typeIDMap, LLVMCodegen::LLVMModuleContext::valueStackPhi, yoi::wstring2string(), yoi::yoi_assert(), and LLVMCodegen::StackValue::yoiType.

|
private |
Definition at line 561 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::LLVMModuleContext::TheModule.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 599 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::string2wstring(), LLVMCodegen::LLVMModuleContext::structTypeMap, and LLVMCodegen::LLVMModuleContext::TheContext.
Referenced by LLVMCodegen::generateImplementations().


|
private |
Definition at line 2887 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::runtimeFunctions, LLVMCodegen::LLVMModuleContext::TheContext, and LLVMCodegen::LLVMModuleContext::TheModule.
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().

|
private |
Definition at line 3765 of file llvmCodegenContext.cpp.
References yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::RTTIEntryType, LLVMCodegen::LLVMModuleContext::RTTITable, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and LLVMCodegen::LLVMModuleContext::typeIDMap.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 3728 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::RTTIEntryType, LLVMCodegen::LLVMModuleContext::RTTITable, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::typeIDMap, and yoi::wstring2string().
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generate().


|
private |
Definition at line 142 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::compilerCtx, IRBuildConfig::debug, LLVMCodegen::LLVMModuleContext::runtimeFunctions, and LLVMCodegen::LLVMModuleContext::TheContext.
Referenced by LLVMCodegen::generate(), and LLVMCodegen::generateImplementations().

|
private |
Definition at line 417 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::getFunctionType(), IRValueType::interfaceObject, IRValueType::Raw, IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::yoiModule, and LLVMCodegen::yoiTypeToLLVMType().
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 464 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::functionMap, yoi::string2wstring(), IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 499 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::callGcFunction(), IRFunctionDefinition::Finalizer, LLVMCodegen::LLVMModuleContext::functionMap, LLVMCodegen::LLVMModuleContext::runtimeFunctions, yoi::string2wstring(), IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::yoiModule, and LLVMCodegen::yoiTypeToLLVMType().
Referenced by LLVMCodegen::generateImplementations().


|
private |
Definition at line 342 of file llvmCodegenContext.cpp.
References IRValueType::interfaceObject, LLVMCodegen::LLVMModuleContext::nextTypeId, IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::typeIDMap, yoi::wstring2string(), and LLVMCodegen::yoiModule.
Referenced by LLVMCodegen::generateDeclarations().


|
private |
Definition at line 2621 of file llvmCodegenContext.cpp.
References yoi::panic(), LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().
Referenced by LLVMCodegen::generate().


|
private |
Definition at line 4397 of file llvmCodegenContext.cpp.
|
private |
Definition at line 3156 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::arrayToGenerateImplementations, LLVMCodegen::LLVMModuleContext::arrayTypeMap, magic_enum::enum_name(), LLVMCodegen::LLVMModuleContext::nextTypeId, yoi::panic(), LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::typeIDMap, and yoi::wstring2string().
Referenced by LLVMCodegen::generateBasicTypeDeclarations(), and LLVMCodegen::handleIntrinsicCall().


|
private |
Definition at line 3338 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::arrayDataRegionDITypeMap, LLVMCodegen::LLVMModuleContext::arrayTypeDIMap, LLVMCodegen::LLVMModuleContext::basicDITypeMap, LLVMCodegen::LLVMModuleContext::compileUnits, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, LLVMCodegen::LLVMModuleContext::dataStructDataRegionTypeDIMap, LLVMCodegen::LLVMModuleContext::DBuilder, magic_enum::enum_name(), yoi::managedPtr(), yoi::panic(), LLVMCodegen::LLVMModuleContext::structTypeDIMap, LLVMCodegen::LLVMModuleContext::TheModule, and yoi::wstring2string().

|
private |
|
private |
Definition at line 2403 of file llvmCodegenContext.cpp.
Referenced by LLVMCodegen::generateFunctionDeclarations(), and LLVMCodegen::generateStructDeclarations().

|
private |
Definition at line 2566 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::functionMap, yoi::managedPtr(), yoi::string2wstring(), and yoi::wstring2string().
Referenced by LLVMCodegen::actualizeInterfaceObject(), and LLVMCodegen::callGcFunction().


|
private |
Definition at line 2413 of file llvmCodegenContext.cpp.
|
private |
Definition at line 4709 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::TheModule.
Referenced by LLVMCodegen::generateGeneratorContextInitialization().

|
private |
Definition at line 4425 of file llvmCodegenContext.cpp.
References LLVMCodegen::llvmModuleContext.
|
private |
Definition at line 183 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::TheModule.
|
private |
Definition at line 2418 of file llvmCodegenContext.cpp.
References LLVMCodegen::ValueStackWithPhi::back(), LLVMCodegen::LLVMModuleContext::Builder, yoi::managedPtr(), yoi::panic(), LLVMCodegen::ValueStackWithPhi::pop_back(), LLVMCodegen::ValueStackWithPhi::push_back(), and LLVMCodegen::LLVMModuleContext::valueStackPhi.

|
private |
Definition at line 2463 of file llvmCodegenContext.cpp.
References LLVMCodegen::ValueStackWithPhi::back(), LLVMCodegen::LLVMModuleContext::Builder, yoi::managedPtr(), yoi::panic(), LLVMCodegen::ValueStackWithPhi::pop_back(), LLVMCodegen::ValueStackWithPhi::push_back(), and LLVMCodegen::LLVMModuleContext::valueStackPhi.

|
private |
Definition at line 3099 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::TheContext, and yoi::yoi_assert().

|
private |
Definition at line 2799 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::arrayTypeMap, LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::foreignTypeMap, yoi::managedPtr(), LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, LLVMCodegen::LLVMModuleContext::TheModule, and IRValueType::typeAffiliateModule.

|
private |
Definition at line 4368 of file llvmCodegenContext.cpp.
References LLVMCodegen::ValueStackWithPhi::back(), LLVMCodegen::LLVMModuleContext::Builder, IRDebugInfo::column, LLVMCodegen::compilerCtx, IR::debugInfo, LLVMCodegen::getArrayLLVMType(), IRFunctionDefinition::Intrinsic, IR::invoke_imported, IRDebugInfo::line, yoi::managedPtr(), IR::opcode, IR::operands, yoi::panic(), LLVMCodegen::ValueStackWithPhi::pop_back(), LLVMCodegen::ValueStackWithPhi::push_back(), LLVMCodegen::LLVMModuleContext::valueStackPhi, and yoi::yoi_assert().

|
private |
Definition at line 3279 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, magic_enum::enum_name(), yoi::managedPtr(), yoi::panic(), and yoi::yoi_assert().

|
private |
Definition at line 4638 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, and IRValueType::datastructObject.
|
private |
Definition at line 3081 of file llvmCodegenContext.cpp.
|
private |
Definition at line 4362 of file llvmCodegenContext.cpp.
References IRValueType::interfaceObject, LLVMCodegen::wrapInterfaceObjectIfRegressed(), and LLVMCodegen::StackValue::yoiType.
Referenced by LLVMCodegen::storeMember().


|
private |
Definition at line 3964 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, yoi::managedPtr(), and LLVMCodegen::LLVMModuleContext::TheContext.

|
private |
Definition at line 4762 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::callGcFunction(), LLVMCodegen::compilerCtx, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, IRValueType::datastructObject, LLVMCodegen::ensureObject(), LLVMCodegen::StackValue::llvmValue, IRValueType::PermanentInCurrentScope, LLVMCodegen::promiseInterfaceObjectIfInterface(), IRValueType::Raw, IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheModule, LLVMCodegen::unboxValue(), LLVMCodegen::StackValue::yoiType, and LLVMCodegen::yoiTypeToLLVMType().
Referenced by LLVMCodegen::createGeneratorContext(), and LLVMCodegen::storeYieldValue().


|
private |
Definition at line 4755 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::currentFunctionDef, LLVMCodegen::LLVMModuleContext::currentGeneratorContextValue, LLVMCodegen::storeMember(), IRValueType::structObject, LLVMCodegen::LLVMModuleContext::structTypeMap, and LLVMCodegen::yoiModule.

|
private |
Definition at line 2545 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, and LLVMCodegen::LLVMModuleContext::structTypeMap.
Referenced by LLVMCodegen::storeMember().

|
private |
Definition at line 4347 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, IRValueType::interfaceObject, LLVMCodegen::StackValue::llvmValue, LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, yoi::yoi_assert(), LLVMCodegen::yoiModule, and LLVMCodegen::StackValue::yoiType.

|
private |
Definition at line 4336 of file llvmCodegenContext.cpp.
References LLVMCodegen::actualizeInterfaceObject(), LLVMCodegen::StackValue::llvmValue, yoi::managedPtr(), LLVMCodegen::yoiModule, and LLVMCodegen::StackValue::yoiType.
Referenced by LLVMCodegen::promiseInterfaceObjectIfInterface().


|
private |
Definition at line 2340 of file llvmCodegenContext.cpp.
References LLVMCodegen::LLVMModuleContext::Builder, LLVMCodegen::LLVMModuleContext::dataStructDataRegionMap, magic_enum::enum_name(), IRValueType::foreignFloatType, LLVMCodegen::LLVMModuleContext::foreignTypeMap, yoi::managedPtr(), yoi::panic(), LLVMCodegen::LLVMModuleContext::structTypeMap, LLVMCodegen::LLVMModuleContext::TheContext, and yoi::wstring2string().
Referenced by LLVMCodegen::generateDataStructDeclarations(), LLVMCodegen::generateGlobalDeclarations(), LLVMCodegen::generateStructDeclarations(), LLVMCodegen::generateStructGCFunctionImplementations(), and LLVMCodegen::storeMember().


|
private |
Definition at line 46 of file llvmCodegenContext.hpp.
Referenced by LLVMCodegen::generate(), and LLVMCodegen::LLVMCodegen().
|
private |
Definition at line 47 of file llvmCodegenContext.hpp.
Referenced by LLVMCodegen::generate().
|
private |
Definition at line 174 of file llvmCodegenContext.hpp.
Referenced by LLVMCodegen::createGeneratorContext(), LLVMCodegen::declareRuntimeFunctions(), LLVMCodegen::generate(), LLVMCodegen::generate(), LLVMCodegen::generateBasicTypeDeclarations(), LLVMCodegen::generateBasicTypeImplementations(), LLVMCodegen::generateGlobalInitializers(), LLVMCodegen::generateRuntimeFunctionImplementations(), LLVMCodegen::handleIntrinsicCall(), and LLVMCodegen::storeMember().
|
mutableprivate |
Definition at line 176 of file llvmCodegenContext.hpp.
|
private |
Definition at line 180 of file llvmCodegenContext.hpp.
|
private |
Definition at line 178 of file llvmCodegenContext.hpp.
Referenced by LLVMCodegen::dumpIR(), LLVMCodegen::generate(), and LLVMCodegen::getLLVMModuleContext().
|
private |
Definition at line 175 of file llvmCodegenContext.hpp.
Referenced by LLVMCodegen::actualizeInterfaceObject(), LLVMCodegen::createGeneratorContext(), LLVMCodegen::createStructObject(), LLVMCodegen::ValueStackWithPhi::enterNode(), LLVMCodegen::generateDataStructDeclarations(), LLVMCodegen::generateDataStructShallowDeclarations(), LLVMCodegen::generateFunctionDeclarations(), LLVMCodegen::generateGlobalDeclarations(), LLVMCodegen::generateGlobalInitializers(), LLVMCodegen::generateStructDeclarations(), LLVMCodegen::generateStructGCFunctionDeclarations(), LLVMCodegen::generateStructGCFunctionImplementations(), LLVMCodegen::generateStructShallowDeclarations(), LLVMCodegen::storeYieldValue(), LLVMCodegen::unwrapInterfaceObject(), and LLVMCodegen::wrapInterfaceObjectIfRegressed().