[pure-lang-svn] SF.net SVN: pure-lang: [35] pure/trunk
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-05-03 10:05:37
|
Revision: 35 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=35&view=rev Author: agraef Date: 2008-05-03 03:05:43 -0700 (Sat, 03 May 2008) Log Message: ----------- Remove temporary workaround which hopefully isn't needed anymore. Modified Paths: -------------- pure/trunk/interpreter.cc pure/trunk/interpreter.hh Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-05-03 06:22:23 UTC (rev 34) +++ pure/trunk/interpreter.cc 2008-05-03 10:05:43 UTC (rev 35) @@ -735,7 +735,6 @@ f->dropAllReferences(); if (h != f) h->eraseFromParent(); f->eraseFromParent(); - reset(); } } @@ -2495,28 +2494,6 @@ return f; } -void interpreter::reset() -{ - /* XXXFIXME: Compile a trivial function to reprime the JIT. Apparently this - is needed to convince the JIT to pick up changes after clearing a - function definition. Don't ask, I don't understand it either. :( Maybe - it's a subtle bug somewhere in the code generator, but I found no other - way to work around it. If anyone knows why this is needed, or has a - better way to do it, please let me know. */ - expr x(EXPR::INT, 0); - Env e(0, 0, x, false); - push("reset", &e); - fun_prolog(""); - e.CreateRet(codegen(x)); - fun_finish(); - pop(&e); - e.fp = JIT->getPointerToFunction(e.f); - assert(e.fp); - pure_expr *y = 0, *res = pure_invoke(e.fp, y); - assert(res); pure_freenew(res); - e.f->eraseFromParent(); -} - pure_expr *interpreter::doeval(expr x, pure_expr*& e) { char test; Modified: pure/trunk/interpreter.hh =================================================================== --- pure/trunk/interpreter.hh 2008-05-03 06:22:23 UTC (rev 34) +++ pure/trunk/interpreter.hh 2008-05-03 10:05:43 UTC (rev 35) @@ -402,7 +402,6 @@ Env *find_stacked(int32_t tag); Env& act_env() { assert(!envstk.empty()); return *envstk.front(); } Builder& act_builder() { return act_env().builder; } - void reset(); pure_expr *doeval(expr x, pure_expr*& e); pure_expr *dodefn(env vars, expr lhs, expr rhs, pure_expr*& e); llvm::Value *codegen(expr x); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |