diff options
Diffstat (limited to 'src/tuplr.hpp')
-rw-r--r-- | src/tuplr.hpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/tuplr.hpp b/src/tuplr.hpp index 925deec..c3c30c4 100644 --- a/src/tuplr.hpp +++ b/src/tuplr.hpp @@ -621,7 +621,7 @@ Subst unify(const Constraints& c); * Code Generation * ***************************************************************************/ -/// Compiler back-end +/// Compiler backend struct Engine { virtual CFunction startFunction(CEnv& cenv, const std::string& name, const AType* retT, const ATuple& argsT, @@ -630,6 +630,7 @@ struct Engine { virtual void finishFunction(CEnv& cenv, CFunction f, const AType* retT, CValue ret) = 0; virtual void eraseFunction(CEnv& cenv, CFunction f) = 0; virtual void liftCall(CEnv& cenv, AFn* fn, const AType& argsT) = 0; + virtual CValue compileLiteral(CEnv& cenv, AST* lit) = 0; virtual CValue compileCall(CEnv& cenv, CFunction f, const vector<CValue>& args) = 0; virtual CValue compilePrimitive(CEnv& cenv, APrimitive* prim) = 0; virtual CValue compileIf(CEnv& cenv, AIf* aif) = 0; @@ -638,10 +639,7 @@ struct Engine { virtual const string call(CEnv& cenv, CFunction f, AType* retT) = 0; }; -extern "C" { - Engine* tuplr_new_engine(); - void tuplr_free_engine(Engine* engine); -} +Engine* tuplr_new_llvm_engine(); /// Compile-Time Environment struct CEnv { |