diff options
author | David Robillard <d@drobilla.net> | 2011-05-14 02:30:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-14 02:30:58 +0000 |
commit | c13b41d2e2dcbbe52f38aa9b12b495a4e2265a05 (patch) | |
tree | 31f188f6152781d0dc9d89be03e4af0bf33ebe29 /src | |
parent | a0367d144bb30ac0eb422b05a962b694602fc601 (diff) | |
download | resp-c13b41d2e2dcbbe52f38aa9b12b495a4e2265a05.tar.gz resp-c13b41d2e2dcbbe52f38aa9b12b495a4e2265a05.tar.bz2 resp-c13b41d2e2dcbbe52f38aa9b12b495a4e2265a05.zip |
Update header for new Engine API
git-svn-id: http://svn.drobilla.net/resp/trunk@413 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r-- | src/resp.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/resp.hpp b/src/resp.hpp index cf74e56..efd0c43 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -493,8 +493,8 @@ ostream& operator<<(ostream& out, const Env<V>& env) { struct PEnv : private map<const string, const char*> { PEnv() : symID(0) {} ~PEnv() { FOREACHP(const_iterator, i, this) free(const_cast<char*>(i->second)); } - string gensymstr(const char* s="_") { return (format("%s_%d") % s % symID++).str(); } - ASymbol* gensym(const char* s="_") { return sym(gensymstr(s)); } + string gensymstr(const char* s="b") { return (format("_%s%d") % s % symID++).str(); } + ASymbol* gensym(const char* s="b") { return sym(gensymstr(s)); } ASymbol* sym(const string& s, Cursor c=Cursor()) { assert(s != ""); const const_iterator i = find(s); @@ -682,7 +682,10 @@ struct Engine { virtual CVal compileDot(CEnv& cenv, CVal tup, int32_t index) = 0; virtual CVal compileGlobalSet(CEnv& cenv, const string& s, CVal v, const AST* t) = 0; virtual CVal compileGlobalGet(CEnv& cenv, const string& s, CVal v) = 0; - virtual CVal compileIf(CEnv& cenv, const AST* cond, const AST* then, const AST* aelse) = 0; + virtual void compileIfStart(CEnv& cenv, const AST* cond, const AST* type) = 0; + virtual void compileIfThen(CEnv& cenv, CVal thenV) = 0; + virtual void compileIfElse(CEnv& cenv, CVal elseV) = 0; + virtual CVal compileIfEnd(CEnv& cenv) = 0; virtual CVal compileLiteral(CEnv& cenv, const AST* lit) = 0; virtual CVal compilePrimitive(CEnv& cenv, const ATuple* prim) = 0; virtual CVal compileString(CEnv& cenv, const char* str) = 0; |