diff options
Diffstat (limited to 'src/repl.cpp')
-rw-r--r-- | src/repl.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/repl.cpp b/src/repl.cpp index d0a251b..923c26d 100644 --- a/src/repl.cpp +++ b/src/repl.cpp @@ -100,7 +100,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) // Lift all expressions Code lifted; for (list<AST*>::iterator i = parsed.begin(); i != parsed.end(); ++i) { - AST* l = (*i)->lift(cenv, lifted); + AST* l = resp_lift(cenv, lifted, *i); if (l) lifted.push_back(l); } @@ -116,7 +116,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) for (Code::const_iterator i = lifted.begin(); i != lifted.end(); ++i) { const ADef* def = (*i)->to<const ADef*>(); if (def && def->list_ref(2)->to<const AFn*>()) { - val = def->compile(cenv); + val = resp_compile(cenv, def); } else { assert(*i); ATuple* tup = (*i)->to<ATuple*>(); @@ -133,7 +133,7 @@ eval(CEnv& cenv, Cursor& cursor, istream& is, bool execute) // Compile expressions (other than function definitions) into it for (list<AST*>::const_iterator i = exprs.begin(); i != exprs.end(); ++i) - val = (*i)->compile(cenv); + val = resp_compile(cenv, *i); // Finish compilation cenv.engine()->finishFunction(cenv, f, val); @@ -170,14 +170,14 @@ repl(CEnv& cenv) break; Code lifted; - ast = ast->lift(cenv, lifted); + ast = resp_lift(cenv, lifted, ast); const AType* type = cenv.type(ast); const AType* fnT = tup<const AType>(cursor, cenv.tenv.Fn, new AType(cursor), type, 0); CFunc f = NULL; try { // Create function for this repl loop f = cenv.engine()->startFunction(cenv, replFnName, new ATuple(cursor), fnT); - cenv.engine()->finishFunction(cenv, f, ast->compile(cenv)); + cenv.engine()->finishFunction(cenv, f, resp_compile(cenv, ast)); callPrintCollect(cenv, f, ast, type, true); if (cenv.args.find("-d") != cenv.args.end()) cenv.engine()->writeModule(cenv, cenv.out); |