|
chigraph
master
Systems programming language written for beginners in LLVM
|
The module that provides built-in operations like literals, math operations, etc. More...
#include <chi/LangModule.hpp>
Inheritance diagram for chi::LangModule:
Collaboration diagram for chi::LangModule:Public Member Functions | |
| LangModule (Context &ctx) | |
| Default constructor, usually called from Context::loadModule("lang") More... | |
| ~LangModule () | |
| Destructor. | |
| Result | addDependency (boost::filesystem::path newDepFullPath) |
| Add a dependency to the module Loads the module from context() if it isn't already loaded. More... | |
| Result | addForwardDeclarations (llvm::Module &module) const override |
| Adds forward declartions for the functions in this module. More... | |
| Context & | context () const |
| Get the Context that this module belongs to. More... | |
| const std::set< boost::filesystem::path > & | dependencies () const |
| Get the dependencies. More... | |
| std::string | fullName () const |
| Get the full name of the module. More... | |
| boost::filesystem::path | fullNamePath () const |
| Get the full name of the module in a path. More... | |
| Result | generateModule (llvm::Module &) override |
| Generate a llvm::Module from the module. More... | |
| std::time_t | lastEditTime () const |
| Get the time that this module was last edited. More... | |
| Result | nodeTypeFromName (boost::string_view name, const nlohmann::json &jsonData, std::unique_ptr< NodeType > *toFill) override |
| Create a node type that is in the module from the name and json. More... | |
| std::vector< std::string > | nodeTypeNames () const override |
| Get the possible node type names. More... | |
| bool | removeDependency (std::string depName) |
| Remove a dependency Does not unload from context. More... | |
| std::string | shortName () const |
| Get the short name of the module (the last bit) More... | |
| DataType | typeFromName (boost::string_view name) override |
| Get a DataType from the name. More... | |
| std::vector< std::string > | typeNames () const override |
| Get the possible DataType names. More... | |
| void | updateLastEditTime (std::time_t newLastEditTime=std::time(nullptr)) |
| Update the last edit time, signifying that it's been edited. More... | |
The module that provides built-in operations like literals, math operations, etc.
Definition at line 16 of file LangModule.hpp.
| chi::LangModule::LangModule | ( | Context & | ctx | ) |
Default constructor, usually called from Context::loadModule("lang")
| ctx | The Context to construct from |
Definition at line 529 of file LangModule.cpp.
References chi::ChiModule::context(), chi::Context::llvmContext(), chi::Context::typeFromModule(), and typeFromName().
Here is the call graph for this function:
|
inherited |
Add a dependency to the module Loads the module from context() if it isn't already loaded.
| newDepFullPath | The dependency, full path |
Definition at line 13 of file ChiModule.cpp.
References chi::ChiModule::context(), and chi::Context::loadModule().
Referenced by chi::ChiModule::dependencies(), and chi::GraphModule::GraphModule().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Adds forward declartions for the functions in this module.
| module | The module to add forward declartions to |
Implements chi::ChiModule.
Definition at line 910 of file LangModule.cpp.
Referenced by typeNames().
Here is the caller graph for this function:
|
inlineinherited |
Get the Context that this module belongs to.
Definition at line 68 of file ChiModule.hpp.
References chi::ChiModule::addForwardDeclarations(), and chi::ChiModule::generateModule().
Referenced by chi::ChiModule::addDependency(), chi::createGraphFunctionDeclarationFromJson(), chi::GraphModule::createNodeTypeFromCCode(), chi::GraphModule::generateModule(), chi::jsonToGraphStruct(), LangModule(), chi::Debugger::nodeFromFrame(), chi::GraphModule::nodeTypeFromName(), chi::GraphModule::removeFunction(), chi::GraphModule::saveToDisk(), chi::GraphModule::sourceFilePath(), chi::Debugger::start(), and typeFromName().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Get the dependencies.
Definition at line 83 of file ChiModule.hpp.
References chi::ChiModule::addDependency().
Referenced by chi::Context::compileModule(), and chi::graphModuleToJson().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineinherited |
Get the full name of the module.
Definition at line 61 of file ChiModule.hpp.
Referenced by chi::GraphModule::addForwardDeclarations(), chi::Context::addModuleFromJson(), chi::Context::compileModule(), chi::createGraphFunctionDeclarationFromJson(), chi::FunctionCompiler::initialize(), chi::GraphModule::nodeTypeFromName(), chi::NodeType::qualifiedName(), chi::DataType::qualifiedName(), chi::GraphFunction::qualifiedName(), chi::GraphModule::removeFunction(), chi::GraphModule::sourceFilePath(), chi::validateFunctionConnectionsAreTwoWay(), chi::validateFunctionEntryType(), chi::validateFunctionExecOutputs(), and chi::validateFunctionNodeInputs().
Here is the caller graph for this function:
|
inlineinherited |
Get the full name of the module in a path.
Definition at line 64 of file ChiModule.hpp.
Referenced by chi::Context::compileModule().
Here is the caller graph for this function:
|
overridevirtual |
Generate a llvm::Module from the module.
Usually called by Context::compileModule
| module | The llvm::Module to fill into – must be already filled with forward declarations of dependencies |
Implements chi::ChiModule.
Definition at line 912 of file LangModule.cpp.
Referenced by typeNames().
Here is the caller graph for this function:
|
inlineinherited |
Get the time that this module was last edited.
std::time_t at which it was last edited Definition at line 101 of file ChiModule.hpp.
Referenced by chi::Context::compileModule().
Here is the caller graph for this function:
|
overridevirtual |
Create a node type that is in the module from the name and json.
| name | The name of the node type to create |
| jsonData | The extra JSON data for the node |
| toFill | The NodeType object to fill |
Implements chi::ChiModule.
Definition at line 847 of file LangModule.cpp.
References chi::Result::addEntry().
Referenced by chi::Context::addModule().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineoverridevirtual |
Get the possible node type names.
Implements chi::ChiModule.
Definition at line 29 of file LangModule.hpp.
|
inlineinherited |
Remove a dependency Does not unload from context.
| depName | The name of the dependency to remove |
Definition at line 95 of file ChiModule.hpp.
|
inlineinherited |
Get the short name of the module (the last bit)
Definition at line 58 of file ChiModule.hpp.
Referenced by chi::Context::compileModule(), chi::GraphModule::pathToCSources(), and chi::validateFunction().
Here is the caller graph for this function:
|
overridevirtual |
Get a DataType from the name.
| name | The name of the type |
Implements chi::ChiModule.
Definition at line 871 of file LangModule.cpp.
References chi::ChiModule::context(), and chi::Context::llvmContext().
Referenced by chi::FunctionCompiler::createSubroutineType(), and LangModule().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineoverridevirtual |
Get the possible DataType names.
std::vector of all the names of types this module has Implements chi::ChiModule.
Definition at line 39 of file LangModule.hpp.
References addForwardDeclarations(), and generateModule().
Here is the call graph for this function:
|
inlineinherited |
Update the last edit time, signifying that it's been edited.
| newLastEditTime | The new time, or current time for default |
Definition at line 105 of file ChiModule.hpp.
Referenced by chi::GraphFunction::addDataInput(), chi::GraphFunction::addDataOutput(), chi::GraphFunction::addExecInput(), chi::GraphFunction::addExecOutput(), chi::GraphStruct::addType(), chi::connectData(), chi::connectExec(), chi::disconnectData(), chi::disconnectExec(), chi::GraphModule::getOrCreateFunction(), chi::GraphFunction::getOrCreateLocalVariable(), chi::GraphModule::getOrCreateStruct(), chi::GraphFunction::getOrInsertEntryNode(), chi::GraphFunction::insertNode(), chi::Context::loadModule(), chi::GraphStruct::modifyType(), chi::GraphFunction::removeDataInput(), chi::GraphFunction::removeDataOutput(), chi::GraphFunction::removeExecInput(), chi::GraphFunction::removeExecOutput(), chi::GraphModule::removeFunction(), chi::GraphFunction::removeLocalVariable(), chi::GraphFunction::removeNode(), chi::GraphModule::removeStruct(), chi::GraphStruct::removeType(), chi::GraphFunction::renameDataInput(), chi::GraphFunction::renameDataOutput(), chi::GraphFunction::renameExecInput(), chi::GraphFunction::renameExecOutput(), chi::GraphFunction::renameLocalVariable(), chi::GraphFunction::retypeDataInput(), chi::GraphFunction::retypeLocalVariable(), chi::GraphStruct::setName(), chi::GraphFunction::setName(), and chi::NodeInstance::setType().
Here is the caller graph for this function: