Xreate
The Xreate programming language
|
The owner of the compilation process. Performs fundamental compilation activities along with the xreate::compilation's routines. More...
The owner of the compilation process. Performs fundamental compilation activities along with the xreate::compilation's routines.
xreate::CompilePass traverses over xreate::AST tree and produces executable code. The pass performs compilation using the following data sources:
The pass generates a bytecode by employing xreate::LLVMLayer(wrapper over LLVM toolchain). Many compilation activities are delegated to more specific routines. Most notable delegated compilation aspects are:
xreate::CompilePass's behaviour can be adapted in several ways:
Clients are free to construct a compiler instantiation with the desired decorators by using xreate::compilation::CompilePassCustomDecorators. As a handy alias, CompilePassCustomDecorators<void, void>
constructs the default compiler.
Public Member Functions | |
void | run () override |
Executes compilation process. | |
compilation::IFunctionUnit * | getFunctionUnit (const ManagedFnPtr &function) |
Returns compiled specified Function. More... | |
llvm::Function * | getEntryFunction () |
Returns compiled main(entry) Function in program. | |
Public Member Functions inherited from AbstractPass< void > | |
virtual void | processFnCall (ManagedFnPtr functionCallee, PassContext context) |
Processes function invocation instruction. | |
virtual void | processFnCallUncertain (const std::string &calleeName, const std::list< ManagedFnPtr > &candidates, PassContext context) |
Processes function invocation instruction in uncertain cases. More... | |
virtual void | process (ManagedRulePtr rule) |
Processes Logic Rule. | |
virtual void | process (ManagedFnPtr function) |
Processes Function. | |
virtual void | process (CodeScope *scope, PassContext context, const std::string &hintBlockDecl="") |
Processes single CodeScope. | |
virtual void | process (const Expression &expression, PassContext context, const std::string &varDecl="") |
Processes single Expression. | |
void | run () |
Executes AST traverse. | |
Public Member Functions inherited from IPass | |
virtual void | finish () |
Finalizes pass. Empty by default. | |
Static Public Member Functions | |
static void | prepareQueries (TranscendLayer *transcend) |
Initializes queries required by compiler. See xreate::IQuery, xreate::TranscendLayer. | |
compilation::IFunctionUnit * getFunctionUnit | ( | const ManagedFnPtr & | function | ) |
Returns compiled specified Function.
Executes function compilation or read cache if it's already done