diff options
author | David Robillard <d@drobilla.net> | 2009-06-26 05:54:43 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-26 05:54:43 +0000 |
commit | 91d2737207d328647e1eb6c66ffca2dcc9277a46 (patch) | |
tree | 47d652f7c827a52f6f72b6d6856c9354a4a0ba48 /tuplr.cpp | |
parent | 755c9629ec34ca5536a49d88821b8b11460756ce (diff) | |
download | resp-91d2737207d328647e1eb6c66ffca2dcc9277a46.tar.gz resp-91d2737207d328647e1eb6c66ffca2dcc9277a46.tar.bz2 resp-91d2737207d328647e1eb6c66ffca2dcc9277a46.zip |
More CPS conversion work.
git-svn-id: http://svn.drobilla.net/resp/tuplr@150 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr.cpp')
-rw-r--r-- | tuplr.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -265,11 +265,13 @@ eval(CEnv& cenv, const string& name, istream& is) // Create function for top-level of program CFunction f = cenv.engine()->startFunction(cenv, "main", resultType, ATuple(cursor)); - + // Print CPS form CValue val = NULL; - /*for (list< pair<SExp, AST*> >::const_iterator i = exprs.begin(); i != exprs.end(); ++i) - cout << "CPS: " << i->second->cps(cenv.tenv, cenv.penv.sym("cont")) << endl;*/ + /*for (list< pair<SExp, AST*> >::const_iterator i = exprs.begin(); i != exprs.end(); ++i) { + cout << "CPS: " << endl; + pprint(cout, i->second->cps(cenv.tenv, cenv.penv.sym("cont"))); + }*/ // Compile all expressions into it for (list< pair<SExp, AST*> >::const_iterator i = exprs.begin(); i != exprs.end(); ++i) @@ -319,7 +321,7 @@ repl(CEnv& cenv) CFunction f = NULL; try { // Create anonymous function to insert code into - f = cenv.engine()->startFunction(cenv, cenv.gensym("_repl"), bodyT, ATuple(cursor)); + f = cenv.engine()->startFunction(cenv, cenv.penv.gensymstr("_repl"), bodyT, ATuple(cursor)); CValue retVal = cenv.compile(body); cenv.engine()->finishFunction(cenv, f, retVal); cenv.out << cenv.engine()->call(cenv, f, bodyT); |