aboutsummaryrefslogtreecommitdiffstats
path: root/src/compile.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-15 19:24:00 +0000
committerDavid Robillard <d@drobilla.net>2009-10-15 19:24:00 +0000
commitc139e62f1fa1341eaa9c6f7b7d8e54601721a329 (patch)
treea20204e68f4ed3128973cd32f443cb9a8f91a9c4 /src/compile.cpp
parent7743d332e41c7795dcbaa49511293f22597e4db7 (diff)
downloadresp-c139e62f1fa1341eaa9c6f7b7d8e54601721a329.tar.gz
resp-c139e62f1fa1341eaa9c6f7b7d8e54601721a329.tar.bz2
resp-c139e62f1fa1341eaa9c6f7b7d8e54601721a329.zip
Remove all use of ATuple::at().
git-svn-id: http://svn.drobilla.net/resp/tuplr@229 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/compile.cpp')
-rw-r--r--src/compile.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/compile.cpp b/src/compile.cpp
index e8e06b8..9a7162f 100644
--- a/src/compile.cpp
+++ b/src/compile.cpp
@@ -51,8 +51,8 @@ ACall::compile(CEnv& cenv)
if (!c) return NULL; // Primitive
AType protT(loc);
- for (size_t i = 1; i < size(); ++i)
- protT.push_back(cenv.type(at(i)));
+ for (const_iterator i = begin() + 1; i != end(); ++i)
+ protT.push_back(cenv.type(*i));
AType fnT(loc);
fnT.push_back(cenv.penv.sym("Fn"));
@@ -63,8 +63,9 @@ ACall::compile(CEnv& cenv)
THROW_IF(!f, loc, (format("callee failed to compile for type %1%") % fnT.str()).str());
vector<CVal> args(size() - 1);
+ const_iterator e = begin() + 1;
for (size_t i = 0; i < args.size(); ++i)
- args[i] = at(i + 1)->compile(cenv);
+ args[i] = (*e++)->compile(cenv);
return cenv.engine()->compileCall(cenv, f, args);
}
@@ -73,8 +74,8 @@ CVal
ADef::compile(CEnv& cenv)
{
// Define stub first for recursion
- cenv.def(sym(), at(2), cenv.type(at(2)), NULL);
- CVal val = at(size() - 1)->compile(cenv);
+ cenv.def(sym(), body(), cenv.type(body()), NULL);
+ CVal val = body()->compile(cenv);
cenv.vals.def(sym(), val);
return val;
}