diff options
Diffstat (limited to 'llvm.cpp')
-rw-r--r-- | llvm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -293,7 +293,7 @@ CValue ASTCall::compile(CEnv& cenv) { AST* c = maybeLookup(cenv, at(0)); - Function* f = dynamic_cast<Function*>(LLVal(cenv.compile(c))); + Function* f = dynamic_cast<Function*>(LLVal(c->compile(cenv))); if (!f) throw Error("callee failed to compile", exp.loc); vector<Value*> params(size() - 1); @@ -408,9 +408,9 @@ ASTPrimitive::compile(CEnv& cenv) AType* ASTConsCall::functionType(CEnv& cenv) { - ASTTuple* protTypes = new ASTTuple(cenv.tenv.type(at(1)), cenv.tenv.type(at(2)), NULL); + ASTTuple* protTypes = new ASTTuple(loc, cenv.tenv.type(at(1)), cenv.tenv.type(at(2)), 0); AType* cellType = new AType(loc, - cenv.penv.sym("Pair"), cenv.tenv.type(at(1)), cenv.tenv.type(at(2))); + cenv.penv.sym("Pair"), cenv.tenv.type(at(1)), cenv.tenv.type(at(2)), 0); return new AType(at(0)->loc, cenv.penv.sym("Fn"), protTypes, cellType, 0); } @@ -423,7 +423,7 @@ ASTConsCall::lift(CEnv& cenv) ASTCall::lift(cenv); - ASTTuple* prot = new ASTTuple(at(1), at(2), NULL); + ASTTuple* prot = new ASTTuple(loc, at(1), at(2), 0); vector<const Type*> types; size_t sz = 0; |