diff options
author | David Robillard <d@drobilla.net> | 2009-06-19 19:20:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-19 19:20:42 +0000 |
commit | b34e4277c0e3b3c2c7431101dc82161a39e1d361 (patch) | |
tree | 1aedd75de97aecc2b3b08f0bd6ceb60170a6b0c3 /tuplr.hpp | |
parent | 27bcb3292bde166a98829a63ff177b6831c46f1f (diff) | |
download | resp-b34e4277c0e3b3c2c7431101dc82161a39e1d361.tar.gz resp-b34e4277c0e3b3c2c7431101dc82161a39e1d361.tar.bz2 resp-b34e4277c0e3b3c2c7431101dc82161a39e1d361.zip |
Work towards garbage collection and explicitly managed stack frames.
git-svn-id: http://svn.drobilla.net/resp/tuplr@126 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr.hpp')
-rw-r--r-- | tuplr.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -165,6 +165,7 @@ struct Object { static GC pool; }; + /*************************************************************************** * Abstract Syntax Tree * ***************************************************************************/ @@ -264,7 +265,8 @@ struct AType : public ATuple { AType(Cursor c, AST* ast, ...) : ATuple(c), kind(EXPR), id(0) { if (!ast) return; va_list args; va_start(args, ast); - push_back(ast); + if (ast) + push_back(ast); for (AST* a = va_arg(args, AST*); a; a = va_arg(args, AST*)) push_back(a); va_end(args); @@ -361,7 +363,7 @@ struct AClosure : public ATuple { bool operator==(const AST& rhs) const { return this == &rhs; } void constrain(TEnv& tenv, Constraints& c) const; void lift(CEnv& cenv); - void liftCall(CEnv& cenv, const vector<AType*>& argsT); + void liftCall(CEnv& cenv, const AType& argsT); CValue compile(CEnv& cenv); ATuple* prot() const { return at(1)->to<ATuple*>(); } Funcs funcs; @@ -607,6 +609,8 @@ struct CEnv { CFunction alloc; Subst tsubst; + map<string,string> args; + private: struct PImpl; ///< Private Implementation PImpl* _pimpl; |