diff options
Diffstat (limited to 'llvm.cpp')
-rw-r--r-- | llvm.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |