aboutsummaryrefslogtreecommitdiffstats
path: root/src/lift.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lift.cpp')
-rw-r--r--src/lift.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lift.cpp b/src/lift.cpp
index f5fe607..499fadd 100644
--- a/src/lift.cpp
+++ b/src/lift.cpp
@@ -31,8 +31,8 @@ AFn::lift(CEnv& cenv)
cenv.def((*p)->as<ASymbol*>(), *p, NULL, NULL);
// Lift body
- for (size_t i = 2; i < size(); ++i)
- at(i)->lift(cenv);
+ for (iterator i = begin() + 2; i != end(); ++i)
+ (*i)->lift(cenv);
cenv.pop();
@@ -40,7 +40,7 @@ AFn::lift(CEnv& cenv)
if (impls.find(type) || !type->concrete())
return;
- AType* protT = type->at(1)->as<AType*>();
+ AType* protT = type->prot()->as<AType*>();
cenv.engine()->compileFunction(cenv, this, *protT);
}
@@ -51,9 +51,9 @@ ACall::lift(CEnv& cenv)
AType argsT(loc);
// Lift arguments
- for (size_t i = 1; i < size(); ++i) {
- at(i)->lift(cenv);
- argsT.push_back(cenv.type(at(i)));
+ for (iterator i = begin() + 1; i != end(); ++i) {
+ (*i)->lift(cenv);
+ argsT.push_back(cenv.type(*i));
}
if (!c) return; // Primitive
@@ -70,9 +70,9 @@ void
ADef::lift(CEnv& cenv)
{
// Define stub first for recursion
- cenv.def(sym(), at(2), cenv.type(at(2)), NULL);
- AFn* c = at(2)->to<AFn*>();
+ cenv.def(sym(), body(), cenv.type(body()), NULL);
+ AFn* c = body()->to<AFn*>();
if (c)
c->name = sym()->str();
- at(2)->lift(cenv);
+ body()->lift(cenv);
}