aboutsummaryrefslogtreecommitdiffstats
path: root/src/cps.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-03 00:52:49 +0000
committerDavid Robillard <d@drobilla.net>2010-12-03 00:52:49 +0000
commita2a6e8e4cefda1bb1cbdae53aab9d00b9a8688ca (patch)
tree29591923e314b9e11d111c5f402f50f50c2d17e4 /src/cps.cpp
parentbbad3fe368b2086ec93f082a9436b1dfbc8f0e84 (diff)
downloadresp-a2a6e8e4cefda1bb1cbdae53aab9d00b9a8688ca.tar.gz
resp-a2a6e8e4cefda1bb1cbdae53aab9d00b9a8688ca.tar.bz2
resp-a2a6e8e4cefda1bb1cbdae53aab9d00b9a8688ca.zip
Merge ACall and ATuple.
git-svn-id: http://svn.drobilla.net/resp/resp@285 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/cps.cpp')
-rw-r--r--src/cps.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cps.cpp b/src/cps.cpp
index 6f14d97..889a716 100644
--- a/src/cps.cpp
+++ b/src/cps.cpp
@@ -26,7 +26,7 @@
AST*
AST::cps(TEnv& tenv, AST* cont) const
{
- return tup<ACall>(loc, cont, this, 0);
+ return tup<ATuple>(loc, cont, this, 0);
}
/** (cps (fn (a ...) body) cont) => (cont (fn (a ... k) (cps body k)) */
@@ -41,18 +41,18 @@ AFn::cps(TEnv& tenv, AST* cont) const
++(++p);
for (; p != end(); ++p)
copy->push_back((*p)->cps(tenv, contArg));
- return tup<ACall>(loc, cont, copy, 0);
+ return tup<ATuple>(loc, cont, copy, 0);
}
AST*
APrimitive::cps(TEnv& tenv, AST* cont) const
{
- return value() ? tup<ACall>(loc, cont, this, 0) : ACall::cps(tenv, cont);
+ return value() ? tup<ATuple>(loc, cont, this, 0) : ATuple::cps(tenv, cont);
}
/** (cps (f a b ...)) => (a (fn (x) (b (fn (y) ... (cont (f x y ...)) */
AST*
-ACall::cps(TEnv& tenv, AST* cont) const
+ATuple::cps(TEnv& tenv, AST* cont) const
{
std::vector< std::pair<AFn*, AST*> > funcs;
AFn* fn = NULL;
@@ -91,7 +91,7 @@ ACall::cps(TEnv& tenv, AST* cont) const
if (firstFnIter != end()) {
// Call this call's callee in the last argument evaluator
- ACall* call = tup<ACall>(loc, 0);
+ ATuple* call = tup<ATuple>(loc, 0);
assert(funcs.size() == size());
for (size_t i = 0; i < funcs.size(); ++i)
call->push_back(funcs[i].second);
@@ -101,7 +101,7 @@ ACall::cps(TEnv& tenv, AST* cont) const
return (*firstFnIter)->cps(tenv, firstFn);
} else {
assert(head()->value());
- ACall* ret = tup<ACall>(loc, 0);
+ ATuple* ret = tup<ATuple>(loc, 0);
FOREACHP(const_iterator, i, this)
ret->push_back((*i));
if (!is_primitive(this))
@@ -115,8 +115,8 @@ AST*
ADef::cps(TEnv& tenv, AST* cont) const
{
AST* val = body()->cps(tenv, cont);
- ACall* valCall = val->to<ACall*>();
- ACall::iterator i = valCall->begin();
+ ATuple* valCall = val->to<ATuple*>();
+ ATuple::iterator i = valCall->begin();
return tup<ADef>(loc, tenv.penv.sym("def"), sym(), *++i, 0);
}