diff options
Diffstat (limited to 'src/llvm.cpp')
-rw-r--r-- | src/llvm.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/llvm.cpp b/src/llvm.cpp index 0f13f76..b01724e 100644 --- a/src/llvm.cpp +++ b/src/llvm.cpp @@ -396,7 +396,7 @@ void ACall::lift(CEnv& cenv) { AFn* c = cenv.tenv.resolve(at(0))->to<AFn*>(); - AType argsT(loc, NULL); + AType argsT(loc); // Lift arguments for (size_t i = 1; i < size(); ++i) { @@ -421,7 +421,7 @@ ACall::compile(CEnv& cenv) if (!c) return NULL; // Primitive - AType protT(loc, NULL); + AType protT(loc); vector<const Type*> types; for (size_t i = 1; i < size(); ++i) { protT.push_back(cenv.type(at(i))); @@ -430,7 +430,10 @@ ACall::compile(CEnv& cenv) TEnv::GenericTypes::const_iterator gt = cenv.tenv.genericTypes.find(c); assert(gt != cenv.tenv.genericTypes.end()); - AType fnT(loc, cenv.penv.sym("Fn"), &protT, cenv.type(this), 0); + AType fnT(loc); + fnT.push_back(cenv.penv.sym("Fn")); + fnT.push_back(&protT); + fnT.push_back(cenv.type(this)); Function* f = (Function*)c->impls.find(&fnT); THROW_IF(!f, loc, (format("callee failed to compile for type %1%") % fnT.str()).str()); |