diff options
author | David Robillard <d@drobilla.net> | 2009-10-06 20:29:06 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-06 20:29:06 +0000 |
commit | 31586bbff8588f8eab127bf57bc311d38ad8e1e0 (patch) | |
tree | fd2b38c0bc57a17559a78a98b8e9c3e8cda8bddb /src/tuplr.hpp | |
parent | f55fa30ac2169357ca089a6a4c73c14480841e6e (diff) | |
download | resp-31586bbff8588f8eab127bf57bc311d38ad8e1e0.tar.gz resp-31586bbff8588f8eab127bf57bc311d38ad8e1e0.tar.bz2 resp-31586bbff8588f8eab127bf57bc311d38ad8e1e0.zip |
Fully abstract backend interface.
git-svn-id: http://svn.drobilla.net/resp/tuplr@197 ad02d1e2-f140-0410-9f75-f8b11f17cedd
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 { |