|
chigraph
master
Systems programming language written for beginners in LLVM
|
The namespace where chigraph lives. More...
Classes | |
| struct | ChiModule |
| An abstract class that represents a module of code in Chigraph Can be compiled to a llvm::Module. More... | |
| struct | Context |
The class that handles the loading, creation, storing, and compilation of modules It also stores a LLVMContext object to be used everywhere. More... | |
| struct | DataType |
| A type of data Loose wrapper around llvm::Type*, except it knows which ChiModule it's in and it embeds debug types. More... | |
| class | Debugger |
| Helper class for using LLDB with chigraph. More... | |
| struct | DefaultModuleCache |
| struct | Flags |
| A template class for type-safe flags. More... | |
| struct | FunctionCompiler |
Class for compiling GraphFunctions into llvm::Functions. More... | |
| struct | GraphFunction |
| this is an AST-like representation of a function in a graph It is used for IDE-like behavior, codegen, and JSON generation. More... | |
| struct | GraphModule |
| Module that holds graph functions. More... | |
| struct | GraphStruct |
| A class holding a compound type defined in a GraphModule. More... | |
| struct | LangModule |
| The module that provides built-in operations like literals, math operations, etc. More... | |
| struct | ModuleCache |
| This class provides an interface for creating module caches. More... | |
| struct | NamedDataType |
| Basicaly a std::pair<std::string, DataType>, except it has nicer names. More... | |
| struct | NodeCompiler |
| Helper to compile nodes. More... | |
| struct | NodeInstance |
| An instance of a node. More... | |
| struct | NodeType |
| A generic node type. More... | |
| struct | Result |
| The result object, used for identifiying errors with good diagnostics. More... | |
| struct | Subprocess |
| Provides an platform-independent abstraction for creating subprocesses. More... | |
Enumerations | |
| enum | CompileSettings { CompileSettings::UseCache = 1u, CompileSettings::LinkDependencies = 1u << 1, CompileSettings::Default = UseCache | LinkDependencies } |
| Settings for compiling modules. More... | |
| enum | VCSType { Git, Unknown } |
Functions | |
| Result | compileCToLLVM (const boost::filesystem::path &ctollvmPath, llvm::LLVMContext &llvmContext, std::vector< std::string > arguments, boost::string_view inputCCode, std::unique_ptr< llvm::Module > *toFill) |
Use chi-ctollvm to compile C source code to a llvm module It also uses stdCIncludePaths to find basic include paths. More... | |
| Result | compileFunction (const GraphFunction &func, llvm::Module *mod, llvm::DICompileUnit *debugCU, llvm::DIBuilder &debugBuilder) |
Compile the graph to an llvm::Function (usually called from JsonModule::generateModule) More... | |
| std::vector< NodeInstance * > | dependentPuresRecursive (const NodeInstance &inst) |
| Get the pures a NodeInstance relies on These are all the dependent pures (it's fetched recursively) They are in the order of dependency, for examply if node X depends on node Y, then node Y will come before node X. More... | |
| boost::filesystem::path | executablePath () |
| Get the path of the executable. More... | |
| Result | fetchModule (const fs::path &workspacePath, const fs::path &name, bool recursive) |
| Result | fetchModule (const boost::filesystem::path &workspacePath, const boost::filesystem::path &name, bool recursive) |
| Downloads a module from a remote URL, currently supports. More... | |
| Result | interpretLLVMIR (std::unique_ptr< llvm::Module > mod, llvm::CodeGenOpt::Level optLevel=llvm::CodeGenOpt::Default, const std::vector< llvm::GenericValue > &args={}, llvm::Function *funcToRun=nullptr, llvm::GenericValue *ret=nullptr) |
| Interpret LLVM IR, just a convenience function. More... | |
| Result | interpretLLVMIRAsMain (std::unique_ptr< llvm::Module > mod, llvm::CodeGenOpt::Level optLevel=llvm::CodeGenOpt::Default, const std::vector< std::string > &args={}, llvm::Function *funcToRun=nullptr, int *ret=nullptr) |
| Interpret LLVM IR as if it were the main function. More... | |
| unsigned | lineNumberFromNode (NodeInstance &inst) |
| Get the mapped line number from a node. More... | |
| Result | operator+ (const Result &lhs, const Result &rhs) |
| Result & | operator+= (Result &lhs, const Result &rhs) |
| Result | parseBitcodeFile (const boost::filesystem::path &file, llvm::LLVMContext &ctx, std::unique_ptr< llvm::Module > *toFill) |
| Parse a bitcode file. More... | |
| Result | parseBitcodeString (const std::string &bitcode, llvm::LLVMContext &ctx, std::unique_ptr< llvm::Module > *toFill) |
| std::pair< std::string, std::string > | parseColonPair (const std::string &in) |
| Parse a colonated pair Example: lang:i32 would turn into {lang, i32}. More... | |
| std::tuple< VCSType, std::string, std::string > | resolveUrlFromModuleName (const boost::filesystem::path &path) |
| Get the URL for a VCS repository from a module name. More... | |
| std::string | stringifyLLVMType (llvm::Type *ty) |
| Turns a type into a string. More... | |
| boost::filesystem::path | workspaceFromChildPath (const boost::filesystem::path &path) |
| Get the workspace directory from a child of the workspace directory Example: say you have a workspace at ~/chi/ If you used this with ~/chi/src/ it would return ~/chi/. More... | |
Function Validation | |
Functions for making sure that generated functions are valid (also usable as a linter tools) | |
| Result | validateFunction (const GraphFunction &func) |
| Validate that a function is compilable. More... | |
| Result | validateFunctionConnectionsAreTwoWay (const GraphFunction &func) |
| Make sure that connections connect back and that they have the same types. More... | |
| Result | validateFunctionNodeInputs (const GraphFunction &func) |
| Make sure that nodes are called before their outputs are used. More... | |
| Result | validateFunctionExecOutputs (const GraphFunction &func) |
| Make sure nodes have an output connection. More... | |
| Result | validateFunctionEntryType (const GraphFunction &func) |
| Make sure the function entry type aligns with the function type. More... | |
| Result | validateFunctionExitTypes (const GraphFunction &func) |
| Make sure the function exit types align with the function type. More... | |
| Result | validateFunctionMainSignature (const GraphFunction &func) |
| Make sure it's a valid signautre for a main function. More... | |
Json Serialization/Deserialization | |
| Result | jsonToGraphModule (Context &createInside, const nlohmann::json &input, const boost::filesystem::path &fullName, GraphModule **toFill=nullptr) |
| Load a GraphModule from json. More... | |
| Result | createGraphFunctionDeclarationFromJson (GraphModule &createInside, const nlohmann::json &input, GraphFunction **toFill=nullptr) |
| Create a forward declaration of a function in a module with an empty graph. More... | |
| Result | jsonToGraphFunction (GraphFunction &createInside, const nlohmann::json &input) |
| Load a GraphFunction–must already exist (use createGraphFunctionDeclarationFromJson) More... | |
| Result | jsonToGraphStruct (GraphModule &mod, boost::string_view name, const nlohmann::json &input, GraphStruct **toFill=nullptr) |
| Load a GraphStruct from json. More... | |
| std::pair< std::string, std::string > | parseObjectPair (const nlohmann::json &object) |
| Parse something that looks like: {"hello": "there"} into {"hello", "there"}. More... | |
| nlohmann::json | graphFunctionToJson (const GraphFunction &func) |
| Serialize a GraphFunction to json. More... | |
| nlohmann::json | graphModuleToJson (const GraphModule &mod) |
| Serialize a JsonModule to json. More... | |
| nlohmann::json | graphStructToJson (const GraphStruct &struc) |
| Serialize a GraphStruct to json. More... | |
Name Mangling | |
Functions for mangling names into names used natively | |
| std::string | mangleFunctionName (std::string fullModuleName, const std::string &name) |
| Mangle a function name. More... | |
| std::pair< std::string, std::string > | unmangleFunctionName (std::string mangled) |
| Unmangle a function name. More... | |
Connection Manipulation | |
Functions for connecting and disconnecting nodes | |
| Result | connectData (NodeInstance &lhs, size_t lhsConnID, NodeInstance &rhs, size_t rhsConnID) |
| Connects two nodes' data connections. More... | |
| Result | connectExec (NodeInstance &lhs, size_t lhsConnID, NodeInstance &rhs, size_t rhsConnID) |
| Connects two nodes' exec connections. More... | |
| Result | disconnectData (NodeInstance &lhs, size_t lhsConnID, NodeInstance &rhs) |
| Disconnect a data connection. More... | |
| Result | disconnectExec (NodeInstance &lhs, size_t lhsConnID) |
| Disconnect a exec connection. More... | |
Standard include finder | |
| Result | stdCIncludePaths (std::vector< boost::filesystem::path > &toFill) |
| Gets the location of the standard C library to include. | |
The namespace where chigraph lives.
|
strong |
Settings for compiling modules.
Definition at line 26 of file Context.hpp.
| Result chi::compileCToLLVM | ( | const boost::filesystem::path & | ctollvmPath, |
| llvm::LLVMContext & | llvmContext, | ||
| std::vector< std::string > | arguments, | ||
| boost::string_view | inputCCode, | ||
| std::unique_ptr< llvm::Module > * | toFill | ||
| ) |
Use chi-ctollvm to compile C source code to a llvm module It also uses stdCIncludePaths to find basic include paths.
| [in] | ctollvmPath | The path to the chi-ctollvm executable. |
| [in] | llvmContext | The LLVM context to create the module into |
| [in] | arguments | The arguments to clang. Can include input files if desired. |
| [in] | inputCCode | The C code to compile. If arguments contains input files, then this can be empty. |
| [out] | toFill | The unique pointer module to create the module inside |
Definition at line 17 of file CCompiler.cpp.
References chi::Result::addEntry(), chi::Result::addScopedContext(), chi::Subprocess::attachStringToStdErr(), chi::Subprocess::attachStringToStdOut(), chi::Subprocess::closeStdIn(), chi::Subprocess::exitCode(), chi::Subprocess::pushToStdIn(), chi::Subprocess::setArguments(), chi::Subprocess::start(), and stdCIncludePaths().
Referenced by chi::GraphModule::createNodeTypeFromCCode(), and chi::GraphModule::generateModule().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::compileFunction | ( | const GraphFunction & | func, |
| llvm::Module * | mod, | ||
| llvm::DICompileUnit * | debugCU, | ||
| llvm::DIBuilder & | debugBuilder | ||
| ) |
Compile the graph to an llvm::Function (usually called from JsonModule::generateModule)
| func | The function to compile |
| mod | The module to codgen into, should already be a valid module |
| debugCU | The compilation unit that the GraphFunction resides in. |
| debugBuilder | The debug builder to build debug info |
Definition at line 371 of file FunctionCompiler.cpp.
Referenced by chi::FunctionCompiler::compiled().
Here is the caller graph for this function:| Result chi::connectData | ( | NodeInstance & | lhs, |
| size_t | lhsConnID, | ||
| NodeInstance & | rhs, | ||
| size_t | rhsConnID | ||
| ) |
Connects two nodes' data connections.
| lhs | The node to the left, the node outputting the data |
| lhsConnID | The ID of data connection in lhs to be connected |
| rhs | The node to the right, that takes in the data as a parameter |
| rhsConnID | The ID of data input in rhs |
lhs.function() == rhs.connection() Definition at line 128 of file NodeInstance.cpp.
References chi::Result::addEntry(), chi::NodeType::dataInputs(), chi::NodeType::dataOutputs(), disconnectData(), chi::NodeInstance::function(), chi::NodeInstance::inputDataConnections, chi::NodeInstance::module(), chi::NodeInstance::outputDataConnections, chi::NodeType::qualifiedName(), chi::NodeType::toJSON(), chi::NodeInstance::type(), and chi::ChiModule::updateLastEditTime().
Referenced by jsonToGraphFunction(), and chi::NodeInstance::module().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::connectExec | ( | NodeInstance & | lhs, |
| size_t | lhsConnID, | ||
| NodeInstance & | rhs, | ||
| size_t | rhsConnID | ||
| ) |
Connects two nodes' exec connections.
| lhs | The node to the left, the node outputting the connections |
| lhsConnID | The ID of exec connection in lhs to be connected |
| rhs | The node to the right, that takes in the exec as a parameter |
| rhsConnID | The ID of exec input in rhs |
lhs.function() == rhs.connection() Definition at line 186 of file NodeInstance.cpp.
References chi::Result::addEntry(), disconnectExec(), chi::NodeType::execInputs(), chi::NodeType::execOutputs(), chi::NodeInstance::function(), chi::NodeInstance::inputExecConnections, chi::NodeInstance::module(), chi::NodeInstance::outputExecConnections, chi::NodeType::qualifiedName(), chi::NodeInstance::type(), and chi::ChiModule::updateLastEditTime().
Referenced by jsonToGraphFunction(), and chi::NodeInstance::module().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::createGraphFunctionDeclarationFromJson | ( | GraphModule & | createInside, |
| const nlohmann::json & | input, | ||
| GraphFunction ** | toFill = nullptr |
||
| ) |
Create a forward declaration of a function in a module with an empty graph.
| [in] | createInside | the GraphModule to create the forward declaration in |
| [in] | input | The input JSON |
| [out] | toFill | The GraphFunction* to fill, optional |
Definition at line 121 of file JsonDeserializer.cpp.
References chi::Result::addEntry(), chi::ChiModule::context(), chi::ChiModule::fullName(), chi::GraphModule::getOrCreateFunction(), parseColonPair(), parseObjectPair(), chi::GraphFunction::setDescription(), and chi::Context::typeFromModule().
Referenced by jsonToGraphModule().
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< NodeInstance * > chi::dependentPuresRecursive | ( | const NodeInstance & | inst | ) |
Get the pures a NodeInstance relies on These are all the dependent pures (it's fetched recursively) They are in the order of dependency, for examply if node X depends on node Y, then node Y will come before node X.
| inst | The NodeInstance to get the dependent pures for |
Definition at line 244 of file NodeCompiler.cpp.
References chi::NodeInstance::inputDataConnections.
Referenced by chi::FunctionCompiler::compile(), chi::NodeCompiler::compile_stage1(), and chi::NodeCompiler::jumpBackInst().
Here is the caller graph for this function:| Result chi::disconnectData | ( | NodeInstance & | lhs, |
| size_t | lhsConnID, | ||
| NodeInstance & | rhs | ||
| ) |
Disconnect a data connection.
| lhs | The left hand node |
| lhsConnID | The ID of the data connection to disconnect |
| rhs | The node that the data port is connected to |
lhs.function() == rhs.connection() Definition at line 229 of file NodeInstance.cpp.
References chi::Result::addEntry(), chi::NodeType::dataInputs(), chi::NodeType::dataOutputs(), chi::NodeInstance::function(), chi::NodeInstance::inputDataConnections, chi::NodeInstance::module(), chi::NodeInstance::outputDataConnections, chi::NodeType::qualifiedName(), chi::NodeInstance::stringId(), chi::NodeType::toJSON(), chi::NodeInstance::type(), and chi::ChiModule::updateLastEditTime().
Referenced by connectData(), chi::NodeInstance::module(), chi::GraphFunction::removeNode(), and chi::NodeInstance::setType().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::disconnectExec | ( | NodeInstance & | lhs, |
| size_t | lhsConnID | ||
| ) |
Disconnect a exec connection.
| lhs | The left hand node in the connection |
| lhsConnID | The ID of the connection on lhs |
Definition at line 294 of file NodeInstance.cpp.
References chi::Result::addEntry(), chi::NodeType::execOutputs(), chi::NodeInstance::module(), chi::NodeInstance::outputExecConnections, chi::NodeType::qualifiedName(), chi::NodeInstance::stringId(), chi::NodeInstance::type(), and chi::ChiModule::updateLastEditTime().
Referenced by connectExec(), chi::NodeInstance::module(), chi::GraphFunction::removeNode(), and chi::NodeInstance::setType().
Here is the call graph for this function:
Here is the caller graph for this function:| boost::filesystem::path chi::executablePath | ( | ) |
Get the path of the executable.
Referenced by chi::Context::compileModule().
Here is the caller graph for this function:| Result chi::fetchModule | ( | const boost::filesystem::path & | workspacePath, |
| const boost::filesystem::path & | name, | ||
| bool | recursive | ||
| ) |
Downloads a module from a remote URL, currently supports.
| workspacePath | The path to the workspace |
fs::is_regular_file(workspacePath / ".chigraphworkspace") | name | The name of the module to fetch |
| recursive | Should all dependencies be cloned as well? |
| nlohmann::json chi::graphFunctionToJson | ( | const GraphFunction & | func | ) |
Serialize a GraphFunction to json.
| func | The function to serialize |
Definition at line 15 of file JsonSerializer.cpp.
References chi::GraphFunction::dataInputs(), chi::GraphFunction::dataOutputs(), chi::GraphFunction::description(), chi::GraphFunction::execInputs(), chi::GraphFunction::execOutputs(), chi::GraphFunction::localVariables(), chi::GraphFunction::name(), and chi::GraphFunction::nodes().
Referenced by graphModuleToJson().
Here is the call graph for this function:
Here is the caller graph for this function:| nlohmann::json chi::graphModuleToJson | ( | const GraphModule & | mod | ) |
Serialize a JsonModule to json.
| mod | The module to serialize |
Definition at line 97 of file JsonSerializer.cpp.
References chi::GraphModule::cEnabled(), chi::ChiModule::dependencies(), chi::GraphModule::functions(), graphFunctionToJson(), and graphStructToJson().
Referenced by chi::GraphModule::saveToDisk().
Here is the call graph for this function:
Here is the caller graph for this function:| nlohmann::json chi::graphStructToJson | ( | const GraphStruct & | struc | ) |
Serialize a GraphStruct to json.
| struc | The struct to serialize |
Definition at line 117 of file JsonSerializer.cpp.
References chi::GraphStruct::types().
Referenced by graphModuleToJson().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::interpretLLVMIR | ( | std::unique_ptr< llvm::Module > | mod, |
| llvm::CodeGenOpt::Level | optLevel = llvm::CodeGenOpt::Default, |
||
| const std::vector< llvm::GenericValue > & | args = {}, |
||
| llvm::Function * | funcToRun = nullptr, |
||
| llvm::GenericValue * | ret = nullptr |
||
| ) |
Interpret LLVM IR, just a convenience function.
| [in] | mod | The LLVM Module to interpret |
| [in] | optLevel | How much the optimization should be applied. The default is roughly equilivant to -O2 |
| [in] | args | The arguments to pass to the function, empty by default |
| [in] | funcToRun | The function to run. By default it uses "main". |
| [out] | ret | The GenericValue to fill with the result of the function. Optional |
Definition at line 528 of file Context.cpp.
References chi::Result::addEntry().
Referenced by chi::Context::moduleCache().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::interpretLLVMIRAsMain | ( | std::unique_ptr< llvm::Module > | mod, |
| llvm::CodeGenOpt::Level | optLevel = llvm::CodeGenOpt::Default, |
||
| const std::vector< std::string > & | args = {}, |
||
| llvm::Function * | funcToRun = nullptr, |
||
| int * | ret = nullptr |
||
| ) |
Interpret LLVM IR as if it were the main function.
| [in] | mod | The module to interpret |
| [in] | optLevel | The optimization level |
| [in] | args | The arguments to main |
| [in] | funcToRun | The function, defaults to "main" from mod |
| [out] | ret | The return from main. Optional. |
Definition at line 564 of file Context.cpp.
References chi::Result::addEntry().
Referenced by chi::Context::moduleCache().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::jsonToGraphFunction | ( | GraphFunction & | createInside, |
| const nlohmann::json & | input | ||
| ) |
Load a GraphFunction–must already exist (use createGraphFunctionDeclarationFromJson)
| createInside | The GraphFunction to create the graph for |
| input | The JSON to load |
Definition at line 232 of file JsonDeserializer.cpp.
References chi::Result::addEntry(), connectData(), connectExec(), chi::GraphFunction::context(), chi::GraphFunction::getOrCreateLocalVariable(), chi::GraphFunction::insertNode(), chi::GraphFunction::nodes(), chi::Context::nodeTypeFromModule(), parseColonPair(), and chi::Context::typeFromModule().
Referenced by jsonToGraphModule().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::jsonToGraphModule | ( | Context & | createInside, |
| const nlohmann::json & | input, | ||
| const boost::filesystem::path & | fullName, | ||
| GraphModule ** | toFill = nullptr |
||
| ) |
Load a GraphModule from json.
| [in] | createInside | The Context to create the module in |
| [in] | input | The JSON to load |
| [in] | fullName | The full name of the module being loaded |
| [out] | toFill | The GraphModule* to set, optional |
Definition at line 14 of file JsonDeserializer.cpp.
References chi::Result::addEntry(), chi::Result::addScopedContext(), createGraphFunctionDeclarationFromJson(), jsonToGraphFunction(), jsonToGraphStruct(), chi::Context::newGraphModule(), and chi::Context::workspacePath().
Referenced by chi::Context::addModuleFromJson().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::jsonToGraphStruct | ( | GraphModule & | mod, |
| boost::string_view | name, | ||
| const nlohmann::json & | input, | ||
| GraphStruct ** | toFill = nullptr |
||
| ) |
Load a GraphStruct from json.
| [in] | mod | The module to create it inside |
| [in] | name | The name of the GraphStruct to create |
| [in] | input | The JSON to load |
| [out] | toFill | The object to fill, optional |
Definition at line 450 of file JsonDeserializer.cpp.
References chi::Result::addEntry(), chi::ChiModule::context(), chi::GraphModule::getOrCreateStruct(), parseColonPair(), parseObjectPair(), and chi::Context::typeFromModule().
Referenced by jsonToGraphModule().
Here is the call graph for this function:
Here is the caller graph for this function:| unsigned chi::lineNumberFromNode | ( | NodeInstance & | inst | ) |
Get the mapped line number from a node.
| inst | The instance to get the line number for |
Definition at line 282 of file Debugger.cpp.
References chi::GraphModule::createLineNumberAssoc(), and chi::NodeInstance::module().
Referenced by chi::Debugger::lldbDebugger(), and chi::Debugger::setBreakpoint().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string chi::mangleFunctionName | ( | std::string | fullModuleName, |
| const std::string & | name | ||
| ) |
Mangle a function name.
| fullModuleName | The full name of the module. Example github.com/russelltg/test/lib |
| name | The name of the function |
Definition at line 9 of file NameMangler.cpp.
Referenced by chi::GraphModule::addForwardDeclarations(), and chi::FunctionCompiler::initialize().
Here is the caller graph for this function:| Result chi::parseBitcodeFile | ( | const boost::filesystem::path & | file, |
| llvm::LLVMContext & | ctx, | ||
| std::unique_ptr< llvm::Module > * | toFill | ||
| ) |
Parse a bitcode file.
Convenience function to make it LLVM version independent and reutrn a result
Definition at line 56 of file BitcodeParser.cpp.
References chi::Result::addEntry().
Referenced by chi::Context::compileModule(), and chi::DefaultModuleCache::retrieveFromCache().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Parse a colonated pair Example: lang:i32 would turn into {lang, i32}.
| in | The colonated pair |
Definition at line 355 of file GraphFunction.hpp.
References chi::GraphFunction::module(), and chi::GraphFunction::name().
Referenced by createGraphFunctionDeclarationFromJson(), jsonToGraphFunction(), jsonToGraphStruct(), and chi::GraphModule::nodeTypeFromName().
Here is the call graph for this function:
Here is the caller graph for this function:| std::pair< std::string, std::string > chi::parseObjectPair | ( | const nlohmann::json & | object | ) |
Parse something that looks like: {"hello": "there"} into {"hello", "there"}.
| object | The json object |
Definition at line 491 of file JsonDeserializer.cpp.
Referenced by createGraphFunctionDeclarationFromJson(), jsonToGraphStruct(), and chi::GraphModule::nodeTypeFromName().
Here is the caller graph for this function:| std::tuple< VCSType, std::string, std::string > chi::resolveUrlFromModuleName | ( | const boost::filesystem::path & | path | ) |
Get the URL for a VCS repository from a module name.
| path | The module name |
Definition at line 303 of file Fetcher.cpp.
| std::string chi::stringifyLLVMType | ( | llvm::Type * | ty | ) |
Turns a type into a string.
| ty | The type to stringify |
Definition at line 474 of file Context.cpp.
Referenced by chi::GraphModule::createNodeTypeFromCCode(), and chi::Context::moduleCache().
Here is the caller graph for this function:| std::pair< std::string, std::string > chi::unmangleFunctionName | ( | std::string | mangled | ) |
Unmangle a function name.
| mangled | The mangled name |
Definition at line 45 of file NameMangler.cpp.
Referenced by chi::Debugger::nodeFromFrame().
Here is the caller graph for this function:| Result chi::validateFunction | ( | const GraphFunction & | func | ) |
Validate that a function is compilable.
If this succeeds, then it should be compilable Calls validateFunctionConnectionsAreTwoWay and validateFunctionNodeInputs
| func | The function to check |
Definition at line 15 of file FunctionValidator.cpp.
References chi::GraphFunction::module(), chi::GraphFunction::name(), chi::ChiModule::shortName(), validateFunctionConnectionsAreTwoWay(), validateFunctionEntryType(), validateFunctionExecOutputs(), validateFunctionExitTypes(), validateFunctionMainSignature(), and validateFunctionNodeInputs().
Referenced by chi::FunctionCompiler::initialize().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionConnectionsAreTwoWay | ( | const GraphFunction & | func | ) |
Make sure that connections connect back and that they have the same types.
| func | The function to check |
Definition at line 31 of file FunctionValidator.cpp.
References chi::Result::addEntry(), chi::Result::addScopedContext(), chi::ChiModule::fullName(), chi::NodeInstance::inputDataConnections, chi::GraphFunction::module(), chi::GraphFunction::name(), chi::GraphFunction::nodes(), chi::NodeInstance::outputExecConnections, chi::NodeType::qualifiedName(), chi::NodeInstance::stringId(), and chi::NodeInstance::type().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionEntryType | ( | const GraphFunction & | func | ) |
Make sure the function entry type aligns with the function type.
| func | The function to check |
Definition at line 249 of file FunctionValidator.cpp.
References chi::Result::addEntry(), chi::GraphFunction::dataInputs(), chi::GraphFunction::entryNode(), chi::ChiModule::fullName(), chi::GraphFunction::module(), and chi::GraphFunction::name().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionExecOutputs | ( | const GraphFunction & | func | ) |
Make sure nodes have an output connection.
| func | The function to check |
Definition at line 222 of file FunctionValidator.cpp.
References chi::Result::addEntry(), chi::Result::addScopedContext(), chi::ChiModule::fullName(), chi::GraphFunction::module(), chi::GraphFunction::name(), and chi::GraphFunction::nodes().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionExitTypes | ( | const GraphFunction & | func | ) |
Make sure the function exit types align with the function type.
| func | The function to check |
Definition at line 281 of file FunctionValidator.cpp.
References chi::Result::addEntry(), chi::GraphFunction::dataOutputs(), and chi::GraphFunction::nodesWithType().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionMainSignature | ( | const GraphFunction & | func | ) |
Make sure it's a valid signautre for a main function.
| func | The function to verify |
Definition at line 310 of file FunctionValidator.cpp.
References chi::Result::addEntry(), chi::GraphFunction::dataInputs(), chi::GraphFunction::dataOutputs(), chi::GraphFunction::execInputs(), and chi::GraphFunction::execOutputs().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| Result chi::validateFunctionNodeInputs | ( | const GraphFunction & | func | ) |
Make sure that nodes are called before their outputs are used.
| func | The function to check |
Definition at line 198 of file FunctionValidator.cpp.
References chi::Result::addScopedContext(), chi::GraphFunction::entryNode(), chi::ChiModule::fullName(), chi::GraphFunction::module(), and chi::GraphFunction::name().
Referenced by validateFunction().
Here is the call graph for this function:
Here is the caller graph for this function:| fs::path chi::workspaceFromChildPath | ( | const boost::filesystem::path & | path | ) |
Get the workspace directory from a child of the workspace directory Example: say you have a workspace at ~/chi/ If you used this with ~/chi/src/ it would return ~/chi/.
| path | The child path |
Definition at line 462 of file Context.cpp.
Referenced by chi::Context::Context(), and chi::Context::moduleCache().
Here is the caller graph for this function: