diff options
Diffstat (limited to 'src/lift.cpp')
-rw-r--r-- | src/lift.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lift.cpp b/src/lift.cpp index 1991eb5..799c1e7 100644 --- a/src/lift.cpp +++ b/src/lift.cpp @@ -60,7 +60,7 @@ lift_dot(CEnv& cenv, Code& code, const ATuple* dot) throw() { const ALiteral<int32_t>* index = (ALiteral<int32_t>*)(dot->list_ref(2)); List copy; - copy.push_back(dot->head()); + copy.push_back(dot->fst()); copy.push_back(resp_lift(cenv, code, dot->list_ref(1))); copy.push_back(new ALiteral<int32_t>(T_INT32, index->val + 1, Cursor())); // skip RTTI cenv.setTypeSameAs(copy, dot); @@ -79,7 +79,7 @@ lift_def(CEnv& cenv, Code& code, const ATuple* def) throw() assert(def->list_ref(1)->to_symbol()); List copy; - copy.push_back(def->head()); + copy.push_back(def->fst()); copy.push_back(resp_lift(cenv, code, def->list_ref(1))); for (ATuple::const_iterator t = def->iter_at(2); t != def->end(); ++t) copy.push_back(resp_lift(cenv, code, *t)); @@ -100,7 +100,7 @@ static const AST* lift_fn(CEnv& cenv, Code& code, const ATuple* fn) throw() { List impl; - impl.push_back(fn->head()); + impl.push_back(fn->fst()); const string fnName = cenv.name(fn); const string implNameStr = (fnName != "") @@ -165,7 +165,7 @@ lift_fn(CEnv& cenv, Code& code, const ATuple* fn) throw() implProtT.push_front(tupT); - implT.push_back(type->head()); + implT.push_back(type->fst()); implT.push_back(implProtT.head); implT.push_back(implRetT); @@ -193,7 +193,7 @@ lift_call(CEnv& cenv, Code& code, const ATuple* call) throw() copy.head->loc = call->loc; - const ASymbol* sym = call->head()->to_symbol(); + const ASymbol* sym = call->fst()->to_symbol(); if (sym && !cenv.liftStack.empty() && sym->sym() == cenv.name(cenv.liftStack.top().fn)) { /* Recursive call to innermost function, call implementation directly, * reusing the current "_me" closure parameter (no cons or .). @@ -216,9 +216,9 @@ lift_call(CEnv& cenv, Code& code, const ATuple* call) throw() } else { // Call to a closure, prepend code to access implementation function ATuple* getFn = tup(call->loc, cenv.penv.sym("."), - copy.head->head(), + copy.head->fst(), new ALiteral<int32_t>(T_INT32, 1, Cursor()), NULL); - const ATuple* calleeT = cenv.type(copy.head->head())->as_tuple(); + const ATuple* calleeT = cenv.type(copy.head->fst())->as_tuple(); assert(**calleeT->begin() == *cenv.tenv.Tup); const ATuple* implT = calleeT->list_ref(1)->as_tuple(); copy.push_front(getFn); @@ -233,7 +233,7 @@ static const AST* lift_args(CEnv& cenv, Code& code, const ATuple* call) throw() { List copy; - copy.push_back(call->head()); + copy.push_back(call->fst()); // Lift all arguments for (ATuple::const_iterator i = call->iter_at(1); i != call->end(); ++i) @@ -253,7 +253,7 @@ resp_lift(CEnv& cenv, Code& code, const AST* ast) throw() const ATuple* const call = ast->to_tuple(); if (call) { - const ASymbol* const sym = call->head()->to_symbol(); + const ASymbol* const sym = call->fst()->to_symbol(); const std::string form = sym ? sym->sym() : ""; if (is_primitive(cenv.penv, call)) return lift_args(cenv, code, call); |