aboutsummaryrefslogtreecommitdiffstats
path: root/llvm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm.cpp')
-rw-r--r--llvm.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm.cpp b/llvm.cpp
index 7cfb3b0..871fa18 100644
--- a/llvm.cpp
+++ b/llvm.cpp
@@ -240,7 +240,7 @@ AClosure::liftCall(CEnv& cenv, const vector<AType*>& argsT)
{
TEnv::GenericTypes::const_iterator gt = cenv.tenv.genericTypes.find(this);
assert(gt != cenv.tenv.genericTypes.end());
- AType* genericType = new AType(*gt->second, gt->second->loc);
+ AType* genericType = new AType(*gt->second);
// Find type and build substitution
assert(argsT.size() == prot()->size());
@@ -589,7 +589,7 @@ eval(CEnv& cenv, const string& name, istream& is)
try {
while (true) {
SExp exp = readExpression(cursor, is);
- if (exp.type == SExp::LIST && exp.list.empty())
+ if (exp.type == SExp::LIST && exp.empty())
break;
result = cenv.penv.parse(exp); // Parse input
@@ -607,7 +607,7 @@ eval(CEnv& cenv, const string& name, istream& is)
if (!ctype) throw Error("body has non-compilable type", cursor);
// Create function for top-level of program
- Function* f = compileFunction(cenv, "main", ctype, ATuple());
+ Function* f = compileFunction(cenv, "main", ctype, ATuple(cursor));
// Compile all expressions into it
Value* val = NULL;
@@ -637,7 +637,7 @@ repl(CEnv& cenv)
try {
SExp exp = readExpression(cursor, std::cin);
- if (exp.type == SExp::LIST && exp.list.empty())
+ if (exp.type == SExp::LIST && exp.empty())
break;
AST* body = cenv.penv.parse(exp); // Parse input
@@ -660,7 +660,7 @@ repl(CEnv& cenv)
if (lltype(bodyT)) {
// Create anonymous function to insert code into
- Function* f = compileFunction(cenv, cenv.gensym("_repl"), lltype(bodyT), ATuple());
+ Function* f = compileFunction(cenv, cenv.gensym("_repl"), lltype(bodyT), ATuple(cursor));
try {
Value* retVal = LLVal(cenv.compile(body));
llengine(cenv)->builder.CreateRet(retVal); // Finish function