top | up | prev | next

Module Class

Definition at line 130 of Module.hpp

Constructors

Module()
Module(const std::string& filePath)
Module(const std::string& filePath, bool readRoot)
Module(const std::u32string& name_, const std::string& filePath_, Target target)

Member Functions

void AddCompileUnitId(const std::string& compileUnitId)
void AddExportedData(const std::string& data)
void AddExportedFunction(const std::string& exportedFunction)
void AddReferencedModule(Module* referencedModule)
const std::set<std::string>& AllCompileUnitIds() const
const std::vector<std::string>& AllExportedData() const
const std::vector<std::string>& AllExportedFunctions() const
std::vector<Module*>& AllRefModules()
const std::vector<Module*> AllReferencedModules() const
void Check()
void CheckUpToDate()
void ClearDefines()
void CreateSymbolTable()
int DebugLogIndent() const
void DecDebugLogIndent()
void DefineSymbol(const std::u32string& symbol)
const std::string& DirectoryPath() const
void Dump()
const std::vector<std::string>& ExportedData()
const std::vector<std::string>& ExportedFunctions()
const std::string& FilePathReadFrom() const
ModuleFlags Flags() const
uint8_t Format() const
int64_t GetBuildStartTimeMs() const
int GetBuildTimeMs()
std::string GetCCList(const std::string& sourceFilePath, const std::string& ccText)
void GetColumns(const Span& span, int32_t& startCol, int32_t& endCol) const
std::u32string GetCurrentProjectName()
std::u32string GetCurrentToolName()
std::u32string GetErrorLines(const Span& span) const
int32_t GetFileIndexForFilePath(const std::string& filePath) const
std::string GetFilePath(int32_t fileIndex) const
FileTable& GetFileTable()
bool GetFlag(ModuleFlags flag) const
FunctionIndex& GetFunctionIndex()
std::vector<Lexer*>* GetLexers()
std::recursive_mutex& GetLock()
ModuleDependency& GetModuleDependency()
std::unordered_map<std::string, int16_t>* GetModuleIdMap()
std::unordered_map<int16_t, std::string>* GetModuleNameTable()
std::string GetOverloadList(const std::string& functionGroup)
Sources* GetSources() const
SymbolTable& GetSymbolTable()
Module* GetSystemCoreModule()
TypeIndex& GetTypeIndex()
bool HasSymbolTable() const
const boost::uuids::uuid& Id() const
void IncDebugLogIndent()
int Index() const
bool IsCore() const
bool IsImmutable() const
bool IsRootModule() const
bool IsSymbolDefined(const std::u32string& symbol)
bool IsSystemModule() const
const std::string& LibraryFilePath() const
const std::vector<std::string>& LibraryFilePaths() const
std::recursive_mutex& Lock()
int LogStreamId() const
void MakeFilePathFileIndexMap()
const std::u32string& Name() const
const std::string& ObjectFileDirectoryPath() const
const std::string& OriginalFilePath() const
ParseResult ParseSource(const std::string& sourceFilePath, const std::u32string& sourceCode)
ParseResult ParseSources()
void PrepareForCompilation(const std::vector<std::string>& references, Target target)
bool Preparing() const
void ReadHeader(Target target, SymbolReader& reader, Module* rootModule, std::unordered_set<std::string>& importSet, std::vector<Module*>& modules, std::unordered_map<std::string, ModuleDependency*>& dependencyMap, std::unordered_map<std::string, Module*>& readMap, bool& first)
const std::vector<std::string>& ReferenceFilePaths() const
std::vector<Module*>& ReferencedModules()
void RegisterFileTable(FileTable* fileTable, Module* module)
void ResetFlag(ModuleFlags flag)
const std::string& ResourceFilePath() const
void SetCore()
void SetCurrentProjectName(const std::u32string& currentProjectName_)
void SetCurrentToolName(const std::u32string& currentToolName_)
void SetDirectoryPath(const std::string& directoryPath_)
void SetFlag(ModuleFlags flag)
void SetImmutable()
void SetIndex(int index_)
void SetLexers(std::vector<std::unique_ptr<CmajorLexer>>&& lexers_)
void SetLogStreamId(int logStreamId_)
void SetObjectFileDirectoryPath(const std::string& objectFileDirectoryPath_)
void SetPreparing(bool preparing_)
void SetResourceFilePath(const std::string& resourceFilePath_)
void SetRootModule()
void SetSources(Sources* sources_)
void SetSystemModule()
cmajor::debug::SourceSpan SpanToSourceSpan(const Span& span)
void StartBuild()
void StopBuild()
uint32_t SymbolTablePos() const
void UpdateSourceFileModuleMap()
CompileWarningCollection& WarningCollection()
void Write(SymbolWriter& writer)
void WriteCmdbFile(const std::string& cmdbFilePath)
void WriteDebugInfo(BinaryWriter& cmdbWriter, int32_t& numProjects, Module* rootModule)
void WriteProjectDebugInfoFile(const std::string& projectDebufInfoFilePath)

Member Variables

std::set<std::string> allCompileUnitIds
std::vector<std::string> allExportedData
std::vector<std::string> allExportedFunctions
std::vector<Module*> allRefModules
BackEnd backend
int64_t buildStartMs
int64_t buildStopMs
std::set<std::string> compileUnitIds
Config config
std::u32string currentProjectName
std::u32string currentToolName
int debugLogIndent
std::set<std::u32string> defines
std::string directoryPath
std::vector<std::string> exportedData
std::vector<std::string> exportedFunctions
std::unordered_map<std::string, int32_t> filePathFileIndexMap
std::string filePathReadFrom
FileTable fileTable
std::vector<FileTable*> fileTables
ModuleFlags flags
uint8_t format
FunctionIndex functionIndex
bool headerRead
boost::uuids::uuid id
int index
std::vector<Lexer*> lexerVec
std::vector<std::unique_ptr<CmajorLexer>> lexers
std::string libraryFilePath
std::vector<std::string> libraryFilePaths
std::recursive_mutex lock
int logStreamId
ModuleDependency moduleDependency
std::unordered_map<std::string, int16_t> moduleIdMap
std::unordered_map<int16_t, std::string> moduleNameTable
std::u32string name
std::string objectFileDirectoryPath
std::string originalFilePath
bool preparing
std::vector<std::string> referenceFilePaths
std::vector<Module*> referencedModules
std::string resourceFilePath
SourceFileCache sourceFileCache
std::unique_ptr<Sources> sources
std::unique_ptr<SymbolTable> symbolTable
uint32_t symbolTablePos
Module* systemCoreModule
TypeIndex typeIndex
CompileWarningCollection warnings

Constructor Details

Module Constructor

cmajor::symbols::Module::Module()

Definition at line 691 of Module.cpp :
 691 :
 692 format(currentModuleFormat)flags(ModuleFlags::none)name()id(boost::uuids::random_generator()())
 693 originalFilePath()filePathReadFrom()referenceFilePaths()moduleDependency(this)symbolTablePos(0)
 694 symbolTable(nullptr)directoryPath()objectFileDirectoryPath()libraryFilePaths()moduleIdMap()logStreamId(0)headerRead(false)systemCoreModule(nullptr)debugLogIndent(0)index(-1)
 695 buildStartMs(0)buildStopMs(0)preparing(false)backend(sngcm::ast::BackEnd::llvm)config(sngcm::ast::Config::debug)functionIndex(this)
 696 {
 697 }


Declaration at line 133 of Module.hpp


Module Constructor

cmajor::symbols::Module::Module(const std::string& filePath)

Definition at line 699 of Module.cpp :
 699 : Module(filePathfalse)
 700 {
 701 }


Declaration at line 134 of Module.hpp


Module Constructor

cmajor::symbols::Module::Module(const std::string& filePath, bool readRoot)

Definition at line 703 of Module.cpp
Declaration at line 135 of Module.hpp


Module Constructor

cmajor::symbols::Module::Module(const std::u32string& name_, const std::string& filePath_, Target target)

Definition at line 810 of Module.cpp
Declaration at line 136 of Module.hpp


Member Function Details

AddCompileUnitId Member Function

void cmajor::symbols::Module::AddCompileUnitId(const std::string& compileUnitId)

Definition at line 1721 of Module.cpp :
1722 {
1723     std::lock_guard<std::recursive_mutex> lck(lock);
1724     if (compileUnitId.empty())
1725     {
1726         throw std::runtime_error("module '" + ToUtf8(Name()) + "': compile unit id is empty");
1727     }
1728     compileUnitIds.insert(compileUnitId);
1729     allCompileUnitIds.insert(compileUnitId);
1730 }


Declaration at line 220 of Module.hpp

Calls: cmajor::symbols::Module::Name


AddExportedData Member Function

void cmajor::symbols::Module::AddExportedData(const std::string& data)

Definition at line 1375 of Module.cpp :
1376 {
1377     std::lock_guard<std::recursive_mutex> lck(lock);
1378     exportedData.push_back(data);
1379 }


Declaration at line 183 of Module.hpp


AddExportedFunction Member Function

void cmajor::symbols::Module::AddExportedFunction(const std::string& exportedFunction)

Definition at line 1370 of Module.cpp :
1371 {
1372     exportedFunctions.push_back(exportedFunction);
1373 }


Declaration at line 182 of Module.hpp


AddReferencedModule Member Function

void cmajor::symbols::Module::AddReferencedModule(Module * referencedModule)

Definition at line 1128 of Module.cpp :
1129 {
1130     moduleDependency.AddReferencedModule(referencedModule);
1131     if (std::find(referencedModules.cbegin()referencedModules.cend()referencedModule) == referencedModules.cend())
1132     {
1133         referencedModules.push_back(referencedModule);
1134     }
1135 }


Declaration at line 204 of Module.hpp

Calls: cmajor::symbols::ModuleDependency::AddReferencedModule


AllCompileUnitIds Member Function

const std::set<std::string>& cmajor::symbols::Module::AllCompileUnitIds() const

Definition at line 221 of Module.hpp :
221 { return allCompileUnitIds; }


AllExportedData Member Function

const std::vector<std::string>& cmajor::symbols::Module::AllExportedData() const

Definition at line 187 of Module.hpp :
187 { return allExportedData; }


AllExportedFunctions Member Function

const std::vector<std::string>& cmajor::symbols::Module::AllExportedFunctions() const

Definition at line 186 of Module.hpp :
186 { return allExportedFunctions; }


AllRefModules Member Function

std::vector<Module *>& cmajor::symbols::Module::AllRefModules()

Definition at line 202 of Module.hpp :
202 { return allRefModules; }


AllReferencedModules Member Function

const std::vector<Module *> cmajor::symbols::Module::AllReferencedModules() const

Definition at line 147 of Module.hpp :
147 { return allRefModules; }


Check Member Function

void cmajor::symbols::Module::Check()

Definition at line 1701 of Module.cpp :
1702 {
1703     symbolTable->Check();
1704 }


Declaration at line 201 of Module.hpp

Calls: cmajor::symbols::Module::Check

Called by: cmajor::symbols::Module::Check


CheckUpToDate Member Function

void cmajor::symbols::Module::CheckUpToDate()

Definition at line 1521 of Module.cpp
Declaration at line 293 of Module.hpp

Calls: cmajor::symbols::CompileWarningCollection::AddWarning , cmajor::symbols::CompileWarningCollection::Warnings , cmajor::symbols::FileTable::GetFilePath , cmajor::symbols::FileTable::IsEmpty , cmajor::symbols::FileTable::NumFilePaths , cmajor::symbols::Warning::Message

Called by: cmajor::symbols::Module::ReadHeader


ClearDefines Member Function

void cmajor::symbols::Module::ClearDefines()

Definition at line 1636 of Module.cpp :
1637 {
1638     if (IsRootModule())
1639     {
1640         defines = GetCommandLineDefines();
1641     }
1642     else
1643     {
1644         throw std::runtime_error("cannot clear defines for a nonroot module");
1645     }
1646 }


Declaration at line 195 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule


CreateSymbolTable Member Function

void cmajor::symbols::Module::CreateSymbolTable()

Definition at line 968 of Module.cpp :
 969 {
 970     symbolTable.reset(new SymbolTable(this));
 971 }


Declaration at line 151 of Module.hpp


DebugLogIndent Member Function

int cmajor::symbols::Module::DebugLogIndent() const

Definition at line 208 of Module.hpp :
208 { return debugLogIndent; }


DecDebugLogIndent Member Function

void cmajor::symbols::Module::DecDebugLogIndent()

Definition at line 210 of Module.hpp :
210 { --debugLogIndent; }


DefineSymbol Member Function

void cmajor::symbols::Module::DefineSymbol(const std::u32string& symbol)

Definition at line 1648 of Module.cpp :
1649 {
1650     if (IsRootModule())
1651     {
1652         defines.insert(symbol);
1653     }
1654     else
1655     {
1656         throw std::runtime_error("cannot define a symbol for a nonroot module");
1657     }
1658 }


Declaration at line 196 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule


DirectoryPath Member Function

const std::string& cmajor::symbols::Module::DirectoryPath() const

Definition at line 168 of Module.hpp :
168 { return directoryPath; }


Dump Member Function

void cmajor::symbols::Module::Dump()

Definition at line 1381 of Module.cpp
Declaration at line 188 of Module.hpp

Calls: cmajor::symbols::BasicTypeSymbol::Dump , cmajor::symbols::ClassDelegateTypeSymbol::Dump , cmajor::symbols::ClassTypeSymbol::Dump , cmajor::symbols::ConceptSymbol::Dump , cmajor::symbols::ConstantSymbol::Dump , cmajor::symbols::DelegateTypeSymbol::Dump , cmajor::symbols::EnumTypeSymbol::Dump , cmajor::symbols::FileTable::Dump , cmajor::symbols::FunctionSymbol::Dump , cmajor::symbols::Module::Name , cmajor::symbols::ModuleDependency::Dump , cmajor::symbols::Symbol::Dump , cmajor::symbols::SymbolCollector::BasicTypes , cmajor::symbols::SymbolCollector::ClassDelegates , cmajor::symbols::SymbolCollector::Classes , cmajor::symbols::SymbolCollector::Concepts , cmajor::symbols::SymbolCollector::Constants , cmajor::symbols::SymbolCollector::Delegates , cmajor::symbols::SymbolCollector::EnumeratedTypes , cmajor::symbols::SymbolCollector::Functions , cmajor::symbols::SymbolCollector::Interfaces , cmajor::symbols::SymbolCollector::SortByFullName , cmajor::symbols::SymbolCollector::Typedefs , cmajor::symbols::TypedefSymbol::Dump , soulng::util::CodeFormatter::DecIndent , soulng::util::CodeFormatter::IncIndent , soulng::util::CodeFormatter::WriteLine , soulng::util::CodeFormatter::WriteLine


ExportedData Member Function

const std::vector<std::string>& cmajor::symbols::Module::ExportedData()

Definition at line 185 of Module.hpp :
185 { return exportedData; }


ExportedFunctions Member Function

const std::vector<std::string>& cmajor::symbols::Module::ExportedFunctions()

Definition at line 184 of Module.hpp :
184 { return exportedFunctions; }


FilePathReadFrom Member Function

const std::string& cmajor::symbols::Module::FilePathReadFrom() const

Definition at line 143 of Module.hpp :
143 { return filePathReadFrom; }

Called by: cmajor::symbols::ModuleCache::RemoveModule , cmajor::symbols::ModuleCache::Update


Flags Member Function

ModuleFlags cmajor::symbols::Module::Flags() const

Definition at line 139 of Module.hpp :
139 { return flags; }


Format Member Function

uint8_t cmajor::symbols::Module::Format() const

Definition at line 138 of Module.hpp :
138 { return format; }


GetBuildStartTimeMs Member Function

int64_t cmajor::symbols::Module::GetBuildStartTimeMs() const

Definition at line 216 of Module.hpp :
216 { return buildStartMs; }


GetBuildTimeMs Member Function

int cmajor::symbols::Module::GetBuildTimeMs()

Definition at line 1716 of Module.cpp :
1717 {
1718     return static_cast<int>(buildStopMs - buildStartMs);
1719 }


Declaration at line 217 of Module.hpp


GetCCList Member Function

std::string cmajor::symbols::Module::GetCCList(const std::string& sourceFilePath, const std::string& ccText)

Definition at line 1973 of Module.cpp :
1974 {
1975     if (sources)
1976     {
1977         return sources->GetCCList(thissourceFilePathccText);
1978     }
1979     else
1980     {
1981         throw std::runtime_error("sources not set");
1982     }
1983 }


Declaration at line 237 of Module.hpp


GetColumns Member Function

void cmajor::symbols::Module::GetColumns(const Span& span, int32_t& startCol, int32_t& endCol) const

Definition at line 1043 of Module.cpp
Declaration at line 164 of Module.hpp

Calls: cmajor::symbols::Module::GetColumns , cmajor::symbols::Module::GetFilePath , cmajor::symbols::Module::GetFlag

Called by: cmajor::symbols::Module::GetColumns , cmajor::symbols::Symbol::GetLocation


GetCurrentProjectName Member Function

std::u32string cmajor::symbols::Module::GetCurrentProjectName()

Definition at line 1588 of Module.cpp :
1589 {
1590     if (IsRootModule())
1591     {
1592         return currentProjectName;
1593     }
1594     else
1595     {
1596         throw std::runtime_error("cannot get current project name for a nonroot module");
1597     }
1598 }


Declaration at line 191 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule

Called by: cmajor::symbols::Exception::ToJson


GetCurrentToolName Member Function

std::u32string cmajor::symbols::Module::GetCurrentToolName()

Definition at line 1612 of Module.cpp :
1613 {
1614     if (IsRootModule())
1615     {
1616         return currentToolName;
1617     }
1618     else
1619     {
1620         throw std::runtime_error("cannot get current tool name for a nonroot module");
1621     }
1622 }


Declaration at line 193 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule

Called by: cmajor::symbols::Exception::ToJson


GetErrorLines Member Function

std::u32string cmajor::symbols::Module::GetErrorLines(const Span& span) const

Definition at line 1018 of Module.cpp
Declaration at line 163 of Module.hpp

Calls: cmajor::symbols::Module::GetFilePath , cmajor::symbols::Module::GetFlag


GetFileIndexForFilePath Member Function

int32_t cmajor::symbols::Module::GetFileIndexForFilePath(const std::string& filePath) const

Definition at line 1915 of Module.cpp
Declaration at line 230 of Module.hpp


GetFilePath Member Function

std::string cmajor::symbols::Module::GetFilePath(int32_t fileIndex) const

Definition at line 1009 of Module.cpp :
1010 {
1011     if (fileIndex == -1)
1012     {
1013         return std::string();
1014     }
1015     return fileTable.GetFilePath(fileIndex);
1016 }


Declaration at line 162 of Module.hpp

Calls: cmajor::symbols::FileTable::GetFilePath

Called by: cmajor::symbols::Module::GetColumns , cmajor::symbols::Module::GetErrorLines , cmajor::symbols::Module::SpanToSourceSpan


GetFileTable Member Function

FileTable & cmajor::symbols::Module::GetFileTable()

Definition at line 153 of Module.hpp :
153 { return fileTable; }


GetFlag Member Function

bool cmajor::symbols::Module::GetFlag(ModuleFlags flag) const

Definition at line 179 of Module.hpp :
179 { return (flags & flag) != ModuleFlags::none; }

Called by: cmajor::symbols::Module::GetColumns , cmajor::symbols::Module::GetErrorLines , cmajor::symbols::Module::IsCore , cmajor::symbols::Module::IsImmutable , cmajor::symbols::Module::IsRootModule , cmajor::symbols::Module::IsSystemModule , cmajor::symbols::Module::MakeFilePathFileIndexMap , cmajor::symbols::Module::SpanToSourceSpan , cmajor::symbols::SymbolWriter::Write


GetFunctionIndex Member Function

FunctionIndex & cmajor::symbols::Module::GetFunctionIndex()

Definition at line 222 of Module.hpp :
222 { return functionIndex; }


GetLexers Member Function

std::vector<Lexer *>* cmajor::symbols::Module::GetLexers()

Definition at line 1004 of Module.cpp :
1005 {
1006     return &lexerVec;
1007 }


Declaration at line 161 of Module.hpp


GetLock Member Function

std::recursive_mutex& cmajor::symbols::Module::GetLock()

Definition at line 213 of Module.hpp :
213 { return lock; }

Called by: cmajor::symbols::FunctionIndex::AddFunction


GetModuleDependency Member Function

ModuleDependency & cmajor::symbols::Module::GetModuleDependency()

Definition at line 189 of Module.hpp :
189 { return moduleDependency; }

Called by: cmajor::symbols::ModuleDependency::Dump


GetModuleIdMap Member Function

std::unordered_map<std::string, int16_t>* cmajor::symbols::Module::GetModuleIdMap()

Definition at line 228 of Module.hpp :
228 { return &moduleIdMap; }


GetModuleNameTable Member Function

std::unordered_map<int16_t, std::string>* cmajor::symbols::Module::GetModuleNameTable()

Definition at line 227 of Module.hpp :
227 { return &moduleNameTable; }


GetOverloadList Member Function

std::string cmajor::symbols::Module::GetOverloadList(const std::string& functionGroup)

Definition at line 1985 of Module.cpp :
1986 {
1987     Symbol* symbol = symbolTable->GlobalNs().GetContainerScope()->Lookup(ToUtf32(functionGroup));
1988     if (symbol->GetSymbolType() == SymbolType::functionGroupSymbol)
1989     {
1990         FunctionGroupSymbol* functionGroupSymbol = static_cast<FunctionGroupSymbol*>(symbol);
1991         return functionGroupSymbol->GetOverloadList();
1992     }
1993     return std::string();
1994 }


Declaration at line 238 of Module.hpp

Calls: cmajor::symbols::FunctionGroupSymbol::GetOverloadList , cmajor::symbols::Symbol::GetSymbolType


GetSources Member Function

Sources * cmajor::symbols::Module::GetSources() const

Definition at line 234 of Module.hpp :
234 { return sources.get(); }


GetSymbolTable Member Function

SymbolTable & cmajor::symbols::Module::GetSymbolTable()

Definition at line 149 of Module.hpp :
149 { return *symbolTable; }

Called by: cmajor::symbols::ArrayTypeCopyAssignment::CreateTemporariesTo , cmajor::symbols::ArrayTypeCopyConstructor::CreateTemporariesTo , cmajor::symbols::ArrayTypeDefaultConstructor::CreateTemporariesTo , cmajor::symbols::ArrayTypeMoveAssignment::CreateTemporariesTo , cmajor::symbols::ArrayTypeMoveConstructor::CreateTemporariesTo , cmajor::symbols::ClassTypeSymbol::CreateDestructorSymbol , cmajor::symbols::ClassTypeSymbol::CreateLayouts , cmajor::symbols::ClassTypeSymbol::Write , cmajor::symbols::ConceptSymbol::Write , cmajor::symbols::ContainerScope::ParentScope , cmajor::symbols::ContainerSymbol::MakeClassGroupTypeSymbol , cmajor::symbols::DerivedTypeSymbol::AddConst , cmajor::symbols::DerivedTypeSymbol::AddLvalueReference , cmajor::symbols::DerivedTypeSymbol::AddPointer , cmajor::symbols::DerivedTypeSymbol::AddRvalueReference , cmajor::symbols::DerivedTypeSymbol::ComputeTypeId , cmajor::symbols::DerivedTypeSymbol::PlainType , cmajor::symbols::DerivedTypeSymbol::RemoveConst , cmajor::symbols::DerivedTypeSymbol::RemoveDerivations , cmajor::symbols::DerivedTypeSymbol::RemovePointer , cmajor::symbols::DerivedTypeSymbol::RemoveReference , cmajor::symbols::DerivedTypeSymbol::Unify , cmajor::symbols::EnumTypeSymbol::CreateDIType , cmajor::symbols::FunctionSymbol::Write , cmajor::symbols::Source::AddSymbols , cmajor::symbols::Source::GetScopes , cmajor::symbols::Symbol::ClassInterfaceEnumDelegateOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceEnumDelegateOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceOrNsNoThrow , cmajor::symbols::Symbol::ClassOrNsNoThrow , cmajor::symbols::Symbol::ClassOrNsNoThrow , cmajor::symbols::Symbol::GetArrowScope , cmajor::symbols::Symbol::GetArrowScope , cmajor::symbols::Symbol::Ns , cmajor::symbols::Symbol::Ns , cmajor::symbols::TypeSymbol::AddConst , cmajor::symbols::TypeSymbol::AddLvalueReference , cmajor::symbols::TypeSymbol::AddPointer , cmajor::symbols::TypeSymbol::AddRvalueReference


GetSystemCoreModule Member Function

Module * cmajor::symbols::Module::GetSystemCoreModule()

Definition at line 1680 of Module.cpp
Declaration at line 200 of Module.hpp

Calls: cmajor::symbols::Module::GetSystemCoreModule , cmajor::symbols::Module::IsCore

Called by: cmajor::symbols::DerivedTypeSymbol::ComputeTypeId , cmajor::symbols::Module::GetSystemCoreModule


GetTypeIndex Member Function

TypeIndex & cmajor::symbols::Module::GetTypeIndex()

Definition at line 223 of Module.hpp :
223 { return typeIndex; }


HasSymbolTable Member Function

bool cmajor::symbols::Module::HasSymbolTable() const

Definition at line 150 of Module.hpp :
150 { return symbolTable != nullptr; }

Called by: cmajor::symbols::ModuleCache::HasModule , cmajor::symbols::ModuleCache::Restore


Id Member Function

const boost::uuids::uuid& cmajor::symbols::Module::Id() const

Definition at line 141 of Module.hpp :
141 { return id; }

Called by: cmajor::symbols::ClassTemplateSpecializationSymbol::UnifyTemplateArgumentType , cmajor::symbols::Module::UpdateSourceFileModuleMap , cmajor::symbols::Module::WriteProjectDebugInfoFile , cmajor::symbols::ModuleCache::MapModule , cmajor::symbols::ModuleCache::Update , cmajor::symbols::Sources::Parse , cmajor::symbols::Sources::ParseSource , cmajor::symbols::Symbol::GetLocation , cmajor::symbols::SymbolWriter::Write


IncDebugLogIndent Member Function

void cmajor::symbols::Module::IncDebugLogIndent()

Definition at line 209 of Module.hpp :
209 { ++debugLogIndent; }


Index Member Function

int cmajor::symbols::Module::Index() const

Definition at line 211 of Module.hpp :
211 { return index; }

Called by: cmajor::symbols::EditModuleCache::LoadEditModule , cmajor::symbols::ModuleCache::CollectModuleIndices


IsCore Member Function

bool cmajor::symbols::Module::IsCore() const

Definition at line 177 of Module.hpp :
177 { return GetFlag(ModuleFlags::core); }

Calls: cmajor::symbols::Module::GetFlag

Called by: cmajor::symbols::Module::GetSystemCoreModule , cmajor::symbols::SymbolCreatorVisitor::InsertTracer , cmajor::symbols::SymbolTable::GetDerivationId


IsImmutable Member Function

bool cmajor::symbols::Module::IsImmutable() const

Definition at line 175 of Module.hpp :
175 { return GetFlag(ModuleFlags::immutable); }

Calls: cmajor::symbols::Module::GetFlag


IsRootModule Member Function

bool cmajor::symbols::Module::IsRootModule() const

Definition at line 173 of Module.hpp :
173 { return GetFlag(ModuleFlags::root); }

Calls: cmajor::symbols::Module::GetFlag

Called by: cmajor::symbols::ContainerScope::ParentScope , cmajor::symbols::Module::ClearDefines , cmajor::symbols::Module::DefineSymbol , cmajor::symbols::Module::GetCurrentProjectName , cmajor::symbols::Module::GetCurrentToolName , cmajor::symbols::Module::IsSymbolDefined , cmajor::symbols::Module::SetCurrentProjectName , cmajor::symbols::Module::SetCurrentToolName , cmajor::symbols::Module::WarningCollection , cmajor::symbols::ModuleCache::CollectModuleIndices , cmajor::symbols::Symbol::ClassInterfaceEnumDelegateOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceEnumDelegateOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceOrNsNoThrow , cmajor::symbols::Symbol::ClassInterfaceOrNsNoThrow , cmajor::symbols::Symbol::ClassOrNsNoThrow , cmajor::symbols::Symbol::ClassOrNsNoThrow , cmajor::symbols::Symbol::Ns , cmajor::symbols::Symbol::Ns


IsSymbolDefined Member Function

bool cmajor::symbols::Module::IsSymbolDefined(const std::u32string& symbol)

Definition at line 1660 of Module.cpp
Declaration at line 197 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule

Called by: cmajor::symbols::SymbolCreatorVisitor::Visit


IsSystemModule Member Function

bool cmajor::symbols::Module::IsSystemModule() const

Definition at line 171 of Module.hpp :
171 { return GetFlag(ModuleFlags::system); }

Calls: cmajor::symbols::Module::GetFlag

Called by: cmajor::symbols::Module::PrepareForCompilation , cmajor::symbols::Module::ReadHeader , cmajor::symbols::Module::Write


LibraryFilePath Member Function

const std::string& cmajor::symbols::Module::LibraryFilePath() const

Definition at line 144 of Module.hpp :
144 { return libraryFilePath; }

Called by: cmajor::symbols::Module::PrepareForCompilation


LibraryFilePaths Member Function

const std::vector<std::string>& cmajor::symbols::Module::LibraryFilePaths() const

Definition at line 170 of Module.hpp :
170 { return libraryFilePaths; }


Lock Member Function

std::recursive_mutex& cmajor::symbols::Module::Lock()

Definition at line 232 of Module.hpp :
232 { return lock; }


LogStreamId Member Function

int cmajor::symbols::Module::LogStreamId() const

Definition at line 199 of Module.hpp :
199 { return logStreamId; }


MakeFilePathFileIndexMap Member Function

void cmajor::symbols::Module::MakeFilePathFileIndexMap()

Definition at line 983 of Module.cpp :
 984 {
 985     if (GetFlag(ModuleFlags::fileIndexFilePathMapBuilt)) return;
 986     SetFlag(ModuleFlags::fileIndexFilePathMapBuilt);
 987     int16_t n = fileTable.NumFilePaths();
 988     for (int16_t i = 0; i < n; ++i)
 989     {
 990         int32_t fileIndex = i;
 991         filePathFileIndexMap[fileTable.GetFilePath(i)] = fileIndex;
 992     }
 993 }


Declaration at line 155 of Module.hpp

Calls: cmajor::symbols::FileTable::GetFilePath , cmajor::symbols::FileTable::NumFilePaths , cmajor::symbols::Module::GetFlag , cmajor::symbols::Module::SetFlag

Called by: cmajor::symbols::Module::PrepareForCompilation , cmajor::symbols::Module::ReadHeader


Name Member Function

const std::u32string& cmajor::symbols::Module::Name() const

Definition at line 140 of Module.hpp :
140 { return name; }

Called by: cmajor::symbols::Module::AddCompileUnitId , cmajor::symbols::Module::Dump , cmajor::symbols::Module::RegisterFileTable , cmajor::symbols::ModuleDependency::Dump , cmajor::symbols::SymbolCreatorVisitor::InsertTracer , cmajor::symbols::SymbolTable::GetPositionId , cmajor::symbols::SymbolTable::Read , cmajor::symbols::SymbolTable::Write


ObjectFileDirectoryPath Member Function

const std::string& cmajor::symbols::Module::ObjectFileDirectoryPath() const

Definition at line 169 of Module.hpp :
169 { return objectFileDirectoryPath; }


OriginalFilePath Member Function

const std::string& cmajor::symbols::Module::OriginalFilePath() const

Definition at line 142 of Module.hpp :
142 { return originalFilePath; }

Called by: cmajor::symbols::Module::Write , cmajor::symbols::ModuleCache::RemoveModule , cmajor::symbols::ModuleCache::Update


ParseSource Member Function

ParseResult cmajor::symbols::Module::ParseSource(const std::string& sourceFilePath, const std::u32string& sourceCode)

Definition at line 1958 of Module.cpp
Declaration at line 236 of Module.hpp


ParseSources Member Function

ParseResult cmajor::symbols::Module::ParseSources()

Definition at line 1937 of Module.cpp
Declaration at line 235 of Module.hpp


PrepareForCompilation Member Function

void cmajor::symbols::Module::PrepareForCompilation(const std::vector<std::string>& references, Target target)

Definition at line 835 of Module.cpp
Declaration at line 148 of Module.hpp

Calls: cmajor::symbols::FileTable::IsEmpty , cmajor::symbols::Module::IsSystemModule , cmajor::symbols::Module::LibraryFilePath , cmajor::symbols::Module::MakeFilePathFileIndexMap , cmajor::symbols::Module::RegisterFileTable , cmajor::symbols::Module::SetDirectoryPath , cmajor::symbols::Module::SetObjectFileDirectoryPath , soulng::util::Path::Combine , soulng::util::Path::GetDirectoryName , soulng::util::Path::GetFileName


Preparing Member Function

bool cmajor::symbols::Module::Preparing() const

Definition at line 218 of Module.hpp :
218 { return preparing; }


ReadHeader Member Function

void cmajor::symbols::Module::ReadHeader(Target target, SymbolReader & reader, Module * rootModule, std::unordered_set<std::string>& importSet, std::vector<Module *>& modules, std::unordered_map<std::string, ModuleDependency *>& dependencyMap, std::unordered_map<std::string, Module *>& readMap, bool & first)

Definition at line 1137 of Module.cpp
Declaration at line 206 of Module.hpp

Calls: cmajor::symbols::FileTable::IsEmpty , cmajor::symbols::FileTable::Read , cmajor::symbols::Module::CheckUpToDate , cmajor::symbols::Module::IsSystemModule , cmajor::symbols::Module::MakeFilePathFileIndexMap , cmajor::symbols::Module::RegisterFileTable , cmajor::symbols::Module::UpdateSourceFileModuleMap , cmajor::symbols::ModuleTag::Read , cmajor::symbols::SymbolReader::GetBinaryReader , soulng::util::Path::Combine , soulng::util::Path::GetDirectoryName , soulng::util::Path::GetFileName


ReferenceFilePaths Member Function

const std::vector<std::string>& cmajor::symbols::Module::ReferenceFilePaths() const

Definition at line 205 of Module.hpp :
205 { return referenceFilePaths; }


ReferencedModules Member Function

std::vector<Module *>& cmajor::symbols::Module::ReferencedModules()

Definition at line 203 of Module.hpp :
203 { return referencedModules; }

Called by: cmajor::symbols::ModuleCache::CollectModuleIndices


RegisterFileTable Member Function

void cmajor::symbols::Module::RegisterFileTable(FileTable * fileTable, Module * module)

Definition at line 973 of Module.cpp :
 974 {
 975     if (std::find(fileTables.begin()fileTables.end()fileTable) != fileTables.end()) return;
 976     int16_t moduleId = fileTables.size();
 977     fileTables.push_back(fileTable);
 978     std::string moduleName = ToUtf8(module->Name());
 979     moduleIdMap[moduleName] = moduleId;
 980     moduleNameTable[moduleId] = moduleName;
 981 }


Declaration at line 154 of Module.hpp

Calls: cmajor::symbols::Module::Name

Called by: cmajor::symbols::Module::PrepareForCompilation , cmajor::symbols::Module::ReadHeader


ResetFlag Member Function

void cmajor::symbols::Module::ResetFlag(ModuleFlags flag)

Definition at line 181 of Module.hpp :
181 { flags = flags & ~flag; }


ResourceFilePath Member Function

const std::string& cmajor::symbols::Module::ResourceFilePath() const

Definition at line 145 of Module.hpp :
145 { return resourceFilePath; }


SetCore Member Function

void cmajor::symbols::Module::SetCore()

Definition at line 178 of Module.hpp :
178 { SetFlag(ModuleFlags::core); }

Calls: cmajor::symbols::Module::SetFlag


SetCurrentProjectName Member Function

void cmajor::symbols::Module::SetCurrentProjectName(const std::u32string& currentProjectName_)

Definition at line 1576 of Module.cpp :
1577 {
1578     if (IsRootModule())
1579     {
1580         currentProjectName = currentProjectName_;
1581     }
1582     else
1583     {
1584         throw std::runtime_error("cannot set current project name for a nonroot module");
1585     }
1586 }


Declaration at line 190 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule


SetCurrentToolName Member Function

void cmajor::symbols::Module::SetCurrentToolName(const std::u32string& currentToolName_)

Definition at line 1600 of Module.cpp :
1601 {
1602     if (IsRootModule())
1603     {
1604         currentToolName = currentToolName_;
1605     }
1606     else
1607     {
1608         throw std::runtime_error("cannot set current tool name for a nonroot module");
1609     }
1610 }


Declaration at line 192 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule


SetDirectoryPath Member Function

void cmajor::symbols::Module::SetDirectoryPath(const std::string& directoryPath_)

Definition at line 1360 of Module.cpp :
1361 {
1362     directoryPath = directoryPath_;
1363 }


Declaration at line 166 of Module.hpp

Called by: cmajor::symbols::Module::PrepareForCompilation


SetFlag Member Function

void cmajor::symbols::Module::SetFlag(ModuleFlags flag)

Definition at line 180 of Module.hpp :
180 { flags = flags | flag; }

Called by: cmajor::symbols::Module::MakeFilePathFileIndexMap , cmajor::symbols::Module::SetCore , cmajor::symbols::Module::SetImmutable , cmajor::symbols::Module::SetRootModule , cmajor::symbols::Module::SetSystemModule


SetImmutable Member Function

void cmajor::symbols::Module::SetImmutable()

Definition at line 176 of Module.hpp :
176 { SetFlag(ModuleFlags::immutable); }

Calls: cmajor::symbols::Module::SetFlag


SetIndex Member Function

void cmajor::symbols::Module::SetIndex(int index_)

Definition at line 212 of Module.hpp :
212 { index = index_; }

Called by: cmajor::symbols::ModuleCache::Update


SetLexers Member Function

void cmajor::symbols::Module::SetLexers(std::vector<std::unique_ptr<CmajorLexer >>&& lexers_)

Definition at line 995 of Module.cpp :
 996 {
 997     lexers = std::move(lexers_);
 998     for (const auto& lexer : lexers)
 999     {
1000         lexerVec.push_back(lexer.get());
1001     }
1002 }


Declaration at line 160 of Module.hpp


SetLogStreamId Member Function

void cmajor::symbols::Module::SetLogStreamId(int logStreamId_)

Definition at line 198 of Module.hpp :
198 { logStreamId = logStreamId_; }


SetObjectFileDirectoryPath Member Function

void cmajor::symbols::Module::SetObjectFileDirectoryPath(const std::string& objectFileDirectoryPath_)

Definition at line 1365 of Module.cpp :
1366 {
1367     objectFileDirectoryPath = objectFileDirectoryPath_;
1368 }


Declaration at line 167 of Module.hpp

Called by: cmajor::symbols::Module::PrepareForCompilation


SetPreparing Member Function

void cmajor::symbols::Module::SetPreparing(bool preparing_)

Definition at line 219 of Module.hpp :
219 { preparing = preparing_; }


SetResourceFilePath Member Function

void cmajor::symbols::Module::SetResourceFilePath(const std::string& resourceFilePath_)

Definition at line 830 of Module.cpp :
 831 {
 832     resourceFilePath = resourceFilePath_;
 833 }


Declaration at line 146 of Module.hpp


SetRootModule Member Function

void cmajor::symbols::Module::SetRootModule()

Definition at line 174 of Module.hpp :
174 { SetFlag(ModuleFlags::root); }

Calls: cmajor::symbols::Module::SetFlag


SetSources Member Function

void cmajor::symbols::Module::SetSources(Sources * sources_)

Definition at line 233 of Module.hpp :
233 { sources.reset(sources_); }


SetSystemModule Member Function

void cmajor::symbols::Module::SetSystemModule()

Definition at line 172 of Module.hpp :
172 { SetFlag(ModuleFlags::system); }

Calls: cmajor::symbols::Module::SetFlag


SpanToSourceSpan Member Function

cmajor::debug::SourceSpan cmajor::symbols::Module::SpanToSourceSpan(const Span& span)

Definition at line 1887 of Module.cpp
Declaration at line 229 of Module.hpp

Calls: cmajor::symbols::Module::GetFilePath , cmajor::symbols::Module::GetFlag , cmajor::symbols::SourceFileCache::GetFileContent , soulng::lexer::Lexer::GetColumns


StartBuild Member Function

void cmajor::symbols::Module::StartBuild()

Definition at line 1706 of Module.cpp :
1707 {
1708     buildStartMs = CurrentMs();
1709 }


Declaration at line 214 of Module.hpp


StopBuild Member Function

void cmajor::symbols::Module::StopBuild()

Definition at line 1711 of Module.cpp :
1712 {
1713     buildStopMs = CurrentMs();
1714 }


Declaration at line 215 of Module.hpp


SymbolTablePos Member Function

uint32_t cmajor::symbols::Module::SymbolTablePos() const

Definition at line 152 of Module.hpp :
152 { return symbolTablePos; }


UpdateSourceFileModuleMap Member Function

void cmajor::symbols::Module::UpdateSourceFileModuleMap()

Definition at line 1928 of Module.cpp :
1929 {
1930     int16_t n = fileTable.NumFilePaths();
1931     for (int16_t i = 0; i < n; ++i)
1932     {
1933         MapSourceFileToModuleId(backendconfigfileTable.GetFilePath(i)Id());
1934     }
1935 }


Declaration at line 231 of Module.hpp

Calls: cmajor::symbols::FileTable::GetFilePath , cmajor::symbols::FileTable::NumFilePaths , cmajor::symbols::Module::Id

Called by: cmajor::symbols::Module::ReadHeader


WarningCollection Member Function

CompileWarningCollection & cmajor::symbols::Module::WarningCollection()

Definition at line 1624 of Module.cpp :
1625 {
1626     if (IsRootModule())
1627     {
1628         return warnings;
1629     }
1630     else
1631     {
1632         throw std::runtime_error("cannot get warnings for a nonroot module");
1633     }
1634 }


Declaration at line 194 of Module.hpp

Calls: cmajor::symbols::Module::IsRootModule


Write Member Function

void cmajor::symbols::Module::Write(SymbolWriter & writer)

Definition at line 1067 of Module.cpp
Declaration at line 165 of Module.hpp

Calls: cmajor::symbols::FileTable::Write , cmajor::symbols::Module::IsSystemModule , cmajor::symbols::Module::OriginalFilePath , cmajor::symbols::ModuleTag::Write , cmajor::symbols::SymbolWriter::GetBinaryWriter


WriteCmdbFile Member Function

void cmajor::symbols::Module::WriteCmdbFile(const std::string& cmdbFilePath)

Definition at line 1755 of Module.cpp
Declaration at line 225 of Module.hpp

Calls: cmajor::symbols::Module::WriteDebugInfo , soulng::util::BinaryWriter::Pos , soulng::util::BinaryWriter::Seek


WriteDebugInfo Member Function

void cmajor::symbols::Module::WriteDebugInfo(BinaryWriter & cmdbWriter, int32_t& numProjects, Module * rootModule)

Definition at line 1775 of Module.cpp

Calls: soulng::util::BinaryReader::ReadInt , soulng::util::BinaryWriter::Write , soulng::util::Path::ChangeExtension , soulng::util::Path::Combine

Called by: cmajor::symbols::Module::WriteCmdbFile


WriteProjectDebugInfoFile Member Function

void cmajor::symbols::Module::WriteProjectDebugInfoFile(const std::string& projectDebufInfoFilePath)

Definition at line 1732 of Module.cpp
Declaration at line 224 of Module.hpp

Calls: cmajor::symbols::FileTable::GetFilePath , cmajor::symbols::FileTable::NumFilePaths , cmajor::symbols::FunctionIndex::GetMainFunctionId , cmajor::symbols::FunctionIndex::Write , cmajor::symbols::Module::Id , cmajor::symbols::TypeIndex::Write , soulng::util::Path::GetDirectoryName , soulng::util::Path::GetFileNameWithoutExtension


top | up | prev | next