aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-08 20:36:16 +0000
committerDavid Robillard <d@drobilla.net>2010-12-08 20:36:16 +0000
commit41c9834662fdccfc8ae8abde2d279a70ff17c597 (patch)
treead8bc8d7ba9ea1e2fbe42d0bc3ac62c44f48dfd9 /src/resp.hpp
parent1b8528b1abc446b2f36db7650a26a0d629f54f45 (diff)
downloadresp-41c9834662fdccfc8ae8abde2d279a70ff17c597.tar.gz
resp-41c9834662fdccfc8ae8abde2d279a70ff17c597.tar.bz2
resp-41c9834662fdccfc8ae8abde2d279a70ff17c597.zip
Remove Engine::compileIf
git-svn-id: http://svn.drobilla.net/resp/resp@316 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/resp.hpp')
-rw-r--r--src/resp.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resp.hpp b/src/resp.hpp
index 593205d..7dc9f16 100644
--- a/src/resp.hpp
+++ b/src/resp.hpp
@@ -694,6 +694,8 @@ Subst unify(const Constraints& c);
* Code Generation *
***************************************************************************/
+typedef void* IfState;
+
/// Compiler backend
struct Engine {
virtual ~Engine() {}
@@ -719,11 +721,14 @@ struct Engine {
virtual CVal compileString(CEnv& cenv, const char* str) = 0;
virtual CVal compileCall(CEnv& cenv, CFunc f, const AType* fT, ValVec& args) = 0;
virtual CVal compilePrimitive(CEnv& cenv, const ATuple* prim) = 0;
- virtual CVal compileIf(CEnv& cenv, const ATuple* aif) = 0;
virtual CVal compileMatch(CEnv& cenv, const ATuple* match) = 0;
virtual CVal compileGlobal(CEnv& cenv, const AType* t, const string& sym, CVal val) = 0;
virtual CVal compileGlobalGet(CEnv& cenv, const string& sym, CVal val) = 0;
-
+
+ virtual IfState compileIfStart(CEnv& cenv) = 0;
+ virtual void compileIfBranch(CEnv& cenv, IfState state, CVal condV, const AST* then) = 0;
+ virtual CVal compileIfEnd(CEnv& cenv, IfState state, CVal elseV, const AType* type) = 0;
+
virtual void writeModule(CEnv& cenv, std::ostream& os) = 0;
virtual const string call(CEnv& cenv, CFunc f, const AType* retT) = 0;