tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r896327 - in /tuscany/sca-cpp/trunk: modules/python/ modules/scheme/ modules/server/ test/store-script/
Date Wed, 06 Jan 2010 06:35:28 GMT
Author: jsdelfino
Date: Wed Jan  6 06:35:25 2010
New Revision: 896327

URL: http://svn.apache.org/viewvc?rev=896327&view=rev
Log:
Minor cleanup, removed unnecessary references to GC pools.

Modified:
    tuscany/sca-cpp/trunk/modules/python/driver.hpp
    tuscany/sca-cpp/trunk/modules/python/eval.hpp
    tuscany/sca-cpp/trunk/modules/python/python-shell.cpp
    tuscany/sca-cpp/trunk/modules/python/python-test.cpp
    tuscany/sca-cpp/trunk/modules/scheme/driver.hpp
    tuscany/sca-cpp/trunk/modules/scheme/environment.hpp
    tuscany/sca-cpp/trunk/modules/scheme/eval-shell.cpp
    tuscany/sca-cpp/trunk/modules/scheme/eval-test.cpp
    tuscany/sca-cpp/trunk/modules/scheme/eval.hpp
    tuscany/sca-cpp/trunk/modules/server/mod-python.hpp
    tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp
    tuscany/sca-cpp/trunk/test/store-script/store-script-test.cpp

Modified: tuscany/sca-cpp/trunk/modules/python/driver.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/driver.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/driver.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/python/driver.hpp Wed Jan  6 06:35:25 2010
@@ -52,30 +52,30 @@
     return true;
 }
 
-const value evalDriverLoop(PyObject* script, istream& in, ostream& out, const gc_pool&
pool) {
+const value evalDriverLoop(PyObject* script, istream& in, ostream& out) {
     promptForInput(evalInputPrompt, out);
     value input = readValue(in);
     if (isNil(input))
         return input;
-    const value output = evalScript(input, script, pool);
+    const value output = evalScript(input, script);
     announceOutput(evalOutputPrompt, out);
     userPrint(output, out);
-    return evalDriverLoop(script, in, out, pool);
+    return evalDriverLoop(script, in, out);
 }
 
-const bool evalDriverRun(istream& in, ostream& out, const gc_pool& pool) {
+const bool evalDriverRun(istream& in, ostream& out) {
     setupDisplay(out);
-    evalDriverLoop(builtin(pythonRuntime), in, out, pool);
+    evalDriverLoop(builtin(pythonRuntime), in, out);
     return true;
 }
 
-const bool evalDriverRun(const char* path, istream& in, ostream& out, const gc_pool&
pool) {
+const bool evalDriverRun(const char* path, istream& in, ostream& out) {
     setupDisplay(out);
     ifstream is(path);
     failable<PyObject*> script = readScript(path, is);
     if (!hasContent(script))
         return true;
-    evalDriverLoop(content(script), in, out, pool);
+    evalDriverLoop(content(script), in, out);
     Py_DECREF(content(script));
     return true;
 }

Modified: tuscany/sca-cpp/trunk/modules/python/eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/eval.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/python/eval.hpp Wed Jan  6 06:35:25 2010
@@ -238,7 +238,7 @@
 /**
  * Evaluate an expression against a script provided as a python object.
  */
-const failable<value> evalScript(const value& expr, PyObject* script, unused const
gc_pool& pool) {
+const failable<value> evalScript(const value& expr, PyObject* script) {
 
     // Get the requested function
     PyObject* func = PyObject_GetAttrString(script, c_str(car<value>(expr)));
@@ -268,18 +268,18 @@
 /**
  * Evaluate an expression against a script provided as an input stream.
  */
-const failable<value> evalScript(const value& expr, istream& is, unused const
gc_pool& pool) {
+const failable<value> evalScript(const value& expr, istream& is) {
     failable<PyObject*> script = readScript("script", is);
     if (!hasContent(script))
         return mkfailure<value>(reason(script));
-    return evalScript(expr, content(script), pool);
+    return evalScript(expr, content(script));
 }
 
 /**
  * Evaluate an expression against the python builtin module, no script is provided.
  */
-const failable<value> evalExpr(const value& expr, const gc_pool& pool) {
-    return  evalScript(expr, builtin(pythonRuntime), pool);
+const failable<value> evalExpr(const value& expr) {
+    return  evalScript(expr, builtin(pythonRuntime));
 }
 
 }

Modified: tuscany/sca-cpp/trunk/modules/python/python-shell.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/python-shell.cpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/python-shell.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/python/python-shell.cpp Wed Jan  6 06:35:25 2010
@@ -32,9 +32,9 @@
 int main(const int argc, char** argv) {
     tuscany::gc_scoped_pool pool;
     if (argc == 1) {
-        tuscany::python::evalDriverRun(tuscany::cin, tuscany::cout, pool);
+        tuscany::python::evalDriverRun(tuscany::cin, tuscany::cout);
         return 0;
     }
-    tuscany::python::evalDriverRun(argv[1], tuscany::cin, tuscany::cout, pool);
+    tuscany::python::evalDriverRun(argv[1], tuscany::cin, tuscany::cout);
     return 0;
 }

Modified: tuscany/sca-cpp/trunk/modules/python/python-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/python/python-test.cpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/python/python-test.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/python/python-test.cpp Wed Jan  6 06:35:25 2010
@@ -31,10 +31,10 @@
 namespace tuscany {
 namespace python {
 
-const value evalBuiltin(const string& py, const gc_pool& pool) {
+const value evalBuiltin(const string& py) {
     istringstream is(py);
     ostringstream os;
-    evalDriverRun(is, os, pool);
+    evalDriverRun(is, os);
     return str(os);
 }
 
@@ -43,7 +43,7 @@
 
 bool testEval() {
     gc_scoped_pool pool;
-    assert(contains(evalBuiltin(testPythonPrint, pool), "testPrint ok"));
+    assert(contains(evalBuiltin(testPythonPrint), "testPrint ok"));
     return true;
 }
 
@@ -55,7 +55,7 @@
     gc_scoped_pool pool;
     {
         const value exp = mklist<value>("abs", -5);
-        const failable<value> r = evalExpr(exp, pool);
+        const failable<value> r = evalExpr(exp);
         assert(hasContent(r));
         assert(content(r) == value(5));
     }
@@ -64,7 +64,7 @@
         failable<PyObject*> script = readScript("script", is);
         assert(hasContent(script));
         const value exp = mklist<value>("add", 2, 3);
-        const failable<value> r = evalScript(exp, content(script), pool);
+        const failable<value> r = evalScript(exp, content(script));
         assert(hasContent(r));
         assert(content(r) == value(5));
     }
@@ -73,7 +73,7 @@
 
 bool testEvalRun() {
     gc_scoped_pool pool;
-    evalDriverRun(cin, cout, pool);
+    evalDriverRun(cin, cout);
     return true;
 }
 
@@ -99,7 +99,7 @@
 
     const value trl = mklist<value>("testReturnLambda");
     istringstream trlis(testReturnLambda);
-    const failable<value> trlv = evalScript(trl, trlis, pool);
+    const failable<value> trlv = evalScript(trl, trlis);
 
     assert(hasContent(trlv));
     assert(isLambda(content(trlv)));
@@ -108,13 +108,13 @@
 
     istringstream tclis(testCallLambda);
     const value tcl = mklist<value>("testCallLambda", content(trlv), 2, 3);
-    const failable<value> tclv = evalScript(tcl, tclis, pool);
+    const failable<value> tclv = evalScript(tcl, tclis);
     assert(hasContent(tclv));
     assert(content(tclv) == value(6));
 
     istringstream tcelis(testCallLambda);
     const value tcel = mklist<value>("testCallLambda", lambda<value(const list<value>&)>(mult),
3, 4);
-    const failable<value> tcelv = evalScript(tcel, tcelis, pool);
+    const failable<value> tcelv = evalScript(tcel, tcelis);
     assert(hasContent(tcelv));
     assert(content(tcelv) == value(12));
     return true;

Modified: tuscany/sca-cpp/trunk/modules/scheme/driver.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/driver.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/scheme/driver.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/scheme/driver.hpp Wed Jan  6 06:35:25 2010
@@ -53,21 +53,21 @@
     return true;
 }
 
-const value evalDriverLoop(istream& in, ostream& out, Env& env, const gc_pool&
pool) {
+const value evalDriverLoop(istream& in, ostream& out, Env& env) {
     promptForInput(evalInputPrompt, out);
     value input = readValue(in);
     if (isNil(input))
         return input;
-    const value output = evalExpr(input, env, pool);
+    const value output = evalExpr(input, env);
     announceOutput(evalOutputPrompt, out);
     userPrint(output, out);
-    return evalDriverLoop(in, out, env, pool);
+    return evalDriverLoop(in, out, env);
 }
 
-const bool evalDriverRun(istream& in, ostream& out, const gc_pool& pool) {
+const bool evalDriverRun(istream& in, ostream& out) {
     setupDisplay(out);
-    Env globalEnv = setupEnvironment(pool);
-    evalDriverLoop(in, out, globalEnv, pool);
+    Env env = setupEnvironment();
+    evalDriverLoop(in, out, env);
     return true;
 }
 

Modified: tuscany/sca-cpp/trunk/modules/scheme/environment.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/environment.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/scheme/environment.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/scheme/environment.hpp Wed Jan  6 06:35:25 2010
@@ -102,8 +102,8 @@
     return makeBinding(newFrame, cdr(variables), cdr(values));
 }
 
-const gc_ptr<Frame> makeFrame(const list<value>& variables, const list<value>
values, const gc_pool& pool) {
-    gc_ptr<Frame> frame = new (gc_new<Frame>(pool)) Frame();
+const gc_ptr<Frame> makeFrame(const list<value>& variables, const list<value>
values) {
+    gc_ptr<Frame> frame = new (gc_new<Frame>()) Frame();
     *frame = value(makeBinding(cons(value(list<value>()), list<value>()), variables,
values));
     return frame;
 }
@@ -141,12 +141,12 @@
     return true;
 }
 
-const Env extendEnvironment(const list<value>& vars, const list<value>&
vals, const Env& baseEnv, const gc_pool& pool) {
-    return cons<value>(makeFrame(vars, vals, pool), baseEnv);
+const Env extendEnvironment(const list<value>& vars, const list<value>&
vals, const Env& baseEnv) {
+    return cons<value>(makeFrame(vars, vals), baseEnv);
 }
 
-const Env setupEnvironment(const gc_pool& pool) {
-    Env env = extendEnvironment(primitiveProcedureNames(), primitiveProcedureObjects(), theEmptyEnvironment(),
pool);
+const Env setupEnvironment() {
+    Env env = extendEnvironment(primitiveProcedureNames(), primitiveProcedureObjects(), theEmptyEnvironment());
     defineVariable(trueSymbol, true, env);
     defineVariable(falseSymbol, false, env);
     return env;

Modified: tuscany/sca-cpp/trunk/modules/scheme/eval-shell.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/eval-shell.cpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/scheme/eval-shell.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/scheme/eval-shell.cpp Wed Jan  6 06:35:25 2010
@@ -31,6 +31,6 @@
 
 int main() {
     tuscany::gc_scoped_pool pool;
-    tuscany::scheme::evalDriverRun(tuscany::cin, tuscany::cout, pool);
+    tuscany::scheme::evalDriverRun(tuscany::cin, tuscany::cout);
     return 0;
 }

Modified: tuscany/sca-cpp/trunk/modules/scheme/eval-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/eval-test.cpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/scheme/eval-test.cpp (original)
+++ tuscany/sca-cpp/trunk/modules/scheme/eval-test.cpp Wed Jan  6 06:35:25 2010
@@ -34,7 +34,7 @@
 bool testEnv() {
     gc_scoped_pool pool;
     Env globalEnv = list<value>();
-    Env env = extendEnvironment(mklist<value>("a"), mklist<value>(1), globalEnv,
pool);
+    Env env = extendEnvironment(mklist<value>("a"), mklist<value>(1), globalEnv);
     defineVariable("x", env, env);
     assert(lookupVariableValue(value("x"), env) == env);
     assert(lookupVariableValue("a", env) == value(1));
@@ -130,39 +130,39 @@
   "(define sqrt (lambda (x) (* x x))) "
   "(testLambda)");
 
-const string evalOutput(const string& scm, const gc_pool& pool) {
+const string evalOutput(const string& scm) {
     istringstream is(scm);
     ostringstream os;
-    evalDriverRun(is, os, pool);
+    evalDriverRun(is, os);
     return str(os);
 }
 
 bool testEval() {
     gc_scoped_pool pool;
-    assert(contains(evalOutput(testSchemeNumber, pool), "testNumber ok"));
-    assert(contains(evalOutput(testSchemeString, pool), "testString ok"));
-    assert(contains(evalOutput(testSchemeDefinition, pool), "testDefinition ok"));
-    assert(contains(evalOutput(testSchemeIf, pool), "testIf ok"));
-    assert(contains(evalOutput(testSchemeCond, pool), "testCond ok"));
-    assert(contains(evalOutput(testSchemeBegin, pool), "testBegin1 ok"));
-    assert(contains(evalOutput(testSchemeBegin, pool), "testBegin2 ok"));
-    assert(contains(evalOutput(testSchemeLambda, pool), "testLambda ok"));
-    assert(contains(evalOutput(testSchemeForward, pool), "testForward ok"));
+    assert(contains(evalOutput(testSchemeNumber), "testNumber ok"));
+    assert(contains(evalOutput(testSchemeString), "testString ok"));
+    assert(contains(evalOutput(testSchemeDefinition), "testDefinition ok"));
+    assert(contains(evalOutput(testSchemeIf), "testIf ok"));
+    assert(contains(evalOutput(testSchemeCond), "testCond ok"));
+    assert(contains(evalOutput(testSchemeBegin), "testBegin1 ok"));
+    assert(contains(evalOutput(testSchemeBegin), "testBegin2 ok"));
+    assert(contains(evalOutput(testSchemeLambda), "testLambda ok"));
+    assert(contains(evalOutput(testSchemeForward), "testForward ok"));
     return true;
 }
 
 bool testEvalExpr() {
     gc_scoped_pool pool;
     const value exp = mklist<value>("+", 2, 3);
-    Env env = setupEnvironment(pool);
-    const value r = evalExpr(exp, env, pool);
+    Env env = setupEnvironment();
+    const value r = evalExpr(exp, env);
     assert(r == value(5));
     return true;
 }
 
 bool testEvalRun() {
     gc_scoped_pool pool;
-    evalDriverRun(cin, cout, pool);
+    evalDriverRun(cin, cout);
     return true;
 }
 
@@ -180,20 +180,20 @@
 
 bool testEvalLambda() {
     gc_scoped_pool pool;
-    Env env = setupEnvironment(pool);
+    Env env = setupEnvironment();
 
     const value trl = mklist<value>("testReturnLambda");
     istringstream trlis(testReturnLambda);
-    const value trlv = evalScript(trl, trlis, env, pool);
+    const value trlv = evalScript(trl, trlis, env);
 
     istringstream tclis(testCallLambda);
     const value tcl = cons<value>("testCallLambda", quotedParameters(mklist<value>(trlv,
2, 3)));
-    const value tclv = evalScript(tcl, tclis, env, pool);
+    const value tclv = evalScript(tcl, tclis, env);
     assert(tclv == value(6));
 
     istringstream tcelis(testCallLambda);
     const value tcel = cons<value>("testCallLambda", quotedParameters(mklist<value>(primitiveProcedure(mult),
3, 4)));
-    const value tcelv = evalScript(tcel, tcelis, env, pool);
+    const value tcelv = evalScript(tcel, tcelis, env);
     assert(tcelv == value(12));
     return true;
 }

Modified: tuscany/sca-cpp/trunk/modules/scheme/eval.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/scheme/eval.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/scheme/eval.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/scheme/eval.hpp Wed Jan  6 06:35:25 2010
@@ -36,7 +36,7 @@
 namespace tuscany {
 namespace scheme {
 
-const value evalExpr(const value& exp, Env& env, const gc_pool& pool);
+const value evalExpr(const value& exp, Env& env);
 
 const value compoundProcedureSymbol("compound-procedure");
 const value procedureSymbol("procedure");
@@ -86,10 +86,10 @@
     return cdr((list<value> )exp);
 }
 
-const list<value> listOfValues(const list<value> exps, Env& env, const gc_pool&
pool) {
+const list<value> listOfValues(const list<value> exps, Env& env) {
     if(isNil(exps))
         return list<value> ();
-    return cons(evalExpr(car(exps), env, pool), listOfValues(cdr(exps), env, pool));
+    return cons(evalExpr(car(exps), env), listOfValues(cdr(exps), env));
 }
 
 const value applyOperat(const value& exp) {
@@ -132,19 +132,19 @@
     return cons(beginSymbol, seq);
 }
 
-const value evalSequence(const list<value>& exps, Env& env, const gc_pool&
pool) {
+const value evalSequence(const list<value>& exps, Env& env) {
     if(isLastExp(exps))
-        return evalExpr(firstExp(exps), env, pool);
-    evalExpr(firstExp(exps), env, pool);
-    return evalSequence(restExp(exps), env, pool);
+        return evalExpr(firstExp(exps), env);
+    evalExpr(firstExp(exps), env);
+    return evalSequence(restExp(exps), env);
 }
 
-const value applyProcedure(const value& procedure, list<value>& arguments,
const gc_pool& pool) {
+const value applyProcedure(const value& procedure, list<value>& arguments)
{
     if(isPrimitiveProcedure(procedure))
         return applyPrimitiveProcedure(procedure, arguments);
     if(isCompoundProcedure(procedure)) {
-        Env env = extendEnvironment(procedureParameters(procedure), arguments, procedureEnvironment(procedure),
pool);
-        return evalSequence(procedureBody(procedure), env, pool);
+        Env env = extendEnvironment(procedureParameters(procedure), arguments, procedureEnvironment(procedure));
+        return evalSequence(procedureBody(procedure), env);
     }
     logStream() << "Unknown procedure type " << procedure << endl;
     return value();
@@ -218,41 +218,41 @@
     return expandClauses(condClauses(exp));
 }
 
-value evalIf(const value& exp, Env& env, const gc_pool& pool) {
-    if(isTrue(evalExpr(ifPredicate(exp), env, pool)))
-        return evalExpr(ifConsequent(exp), env, pool);
-    return evalExpr(ifAlternative(exp), env, pool);
+value evalIf(const value& exp, Env& env) {
+    if(isTrue(evalExpr(ifPredicate(exp), env)))
+        return evalExpr(ifConsequent(exp), env);
+    return evalExpr(ifAlternative(exp), env);
 }
 
-const value evalDefinition(const value& exp, Env& env, const gc_pool& pool) {
-    defineVariable(definitionVariable(exp), evalExpr(definitionValue(exp), env, pool), env);
+const value evalDefinition(const value& exp, Env& env) {
+    defineVariable(definitionVariable(exp), evalExpr(definitionValue(exp), env), env);
     return definitionVariable(exp);
 }
 
-const value evalExpr(const value& exp, Env& env, const gc_pool& pool) {
+const value evalExpr(const value& exp, Env& env) {
     if(isSelfEvaluating(exp))
         return exp;
     if(isQuoted(exp))
         return textOfQuotation(exp);
     if(isDefinition(exp))
-        return evalDefinition(exp, env, pool);
+        return evalDefinition(exp, env);
     if(isIf(exp))
-        return evalIf(exp, env, pool);
+        return evalIf(exp, env);
     if(isBegin(exp))
-        return evalSequence(beginActions(exp), env, pool);
+        return evalSequence(beginActions(exp), env);
     if(isCond(exp))
-        return evalExpr(condToIf(exp), env, pool);
+        return evalExpr(condToIf(exp), env);
     if(isLambdaExpr(exp))
         return makeProcedure(lambdaParameters(exp), lambdaBody(exp), env);
     if(isVariable(exp))
         return lookupVariableValue(exp, env);
     if(isApply(exp)) {
-        list<value> applyOperandValues = evalExpr(applyOperand(exp), env, pool);
-        return applyProcedure(evalExpr(applyOperat(exp), env, pool), applyOperandValues,
pool);
+        list<value> applyOperandValues = evalExpr(applyOperand(exp), env);
+        return applyProcedure(evalExpr(applyOperat(exp), env), applyOperandValues);
     }
     if(isApplication(exp)) {
-        list<value> operandValues = listOfValues(operands(exp), env, pool);
-        return applyProcedure(evalExpr(operat(exp), env, pool), operandValues, pool);
+        list<value> operandValues = listOfValues(operands(exp), env);
+        return applyProcedure(evalExpr(operat(exp), env), operandValues);
     }
     logStream() << "Unknown expression type " << exp << endl;
     return value();
@@ -267,22 +267,22 @@
 /**
  * Evaluate an expression against a script provided as a list of values.
  */
-const value evalScriptLoop(const value& expr, const list<value>& script, scheme::Env&
env, const gc_pool& pool) {
+const value evalScriptLoop(const value& expr, const list<value>& script, scheme::Env&
env) {
     if (isNil(script))
-        return scheme::evalExpr(expr, env, pool);
-    scheme::evalExpr(car(script), env, pool);
-    return evalScriptLoop(expr, cdr(script), env, pool);
+        return scheme::evalExpr(expr, env);
+    scheme::evalExpr(car(script), env);
+    return evalScriptLoop(expr, cdr(script), env);
 }
 
-const value evalScript(const value& expr, const value& script, Env& env, const
gc_pool& pool) {
-    return evalScriptLoop(expr, script, env, pool);
+const value evalScript(const value& expr, const value& script, Env& env) {
+    return evalScriptLoop(expr, script, env);
 }
 
 /**
  * Evaluate an expression against a script provided as an input stream.
  */
-const value evalScript(const value& expr, istream& is, Env& env, const gc_pool&
pool) {
-    return evalScript(expr, readScript(is), env, pool);
+const value evalScript(const value& expr, istream& is, Env& env) {
+    return evalScript(expr, readScript(is), env);
 }
 
 }

Modified: tuscany/sca-cpp/trunk/modules/server/mod-python.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-python.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-python.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-python.hpp Wed Jan  6 06:35:25 2010
@@ -52,8 +52,7 @@
     const value operator()(const list<value>& params) const {
         const value expr = append<value>(params, px);
         debug(expr, "modeval::python::evalImplementation::input");
-        gc_pool pool(gc_current_pool());
-        const failable<value> val = python::evalScript(expr, impl, pool);
+        const failable<value> val = python::evalScript(expr, impl);
         debug(val, "modeval::python::evalImplementation::result");
         if (!hasContent(val))
             return mklist<value>(value(), reason(val));

Modified: tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp (original)
+++ tuscany/sca-cpp/trunk/modules/server/mod-scheme.hpp Wed Jan  6 06:35:25 2010
@@ -61,9 +61,8 @@
     const value operator()(const list<value>& params) const {
         const value expr = cons<value>(car(params), append(scheme::quotedParameters(cdr(params)),
px));
         debug(expr, "modeval::scheme::evalImplementation::input");
-        gc_pool pool(gc_current_pool());
-        scheme::Env globalEnv = scheme::setupEnvironment(pool);
-        const value val = scheme::evalScript(expr, impl, globalEnv, pool);
+        scheme::Env env = scheme::setupEnvironment();
+        const value val = scheme::evalScript(expr, impl, env);
         debug(val, "modeval::scheme::evalImplementation::result");
         if (isNil(val))
             return mklist<value>(value(), string("Could not evaluate expression"));

Modified: tuscany/sca-cpp/trunk/test/store-script/store-script-test.cpp
URL: http://svn.apache.org/viewvc/tuscany/sca-cpp/trunk/test/store-script/store-script-test.cpp?rev=896327&r1=896326&r2=896327&view=diff
==============================================================================
--- tuscany/sca-cpp/trunk/test/store-script/store-script-test.cpp (original)
+++ tuscany/sca-cpp/trunk/test/store-script/store-script-test.cpp Wed Jan  6 06:35:25 2010
@@ -41,7 +41,7 @@
 
     ifstream is("store-script-test.scm");
     ostringstream os;
-    scheme::evalDriverRun(is, os, pool);
+    scheme::evalDriverRun(is, os);
     assert(contains(str(os), "(\"Sample Feed\" \""));
     assert(contains(str(os), "\" (\"Item\" \""));
     assert(contains(str(os), "\" ((javaClass \"services.Item\") (name \"Orange\") (currencyCode
\"USD\") (currencySymbol \"$\") (price 3.55))) (\"Item\" \""));
@@ -55,9 +55,9 @@
         ifstream is("store-script-test.scm");
         ostringstream os;
         scheme::setupDisplay(os);
-        scheme::Env globalEnv = scheme::setupEnvironment(pool);
+        scheme::Env globalEnv = scheme::setupEnvironment();
         const value exp(mklist<value>("storeui_service", string("getcatalog")));
-        const value val = scheme::evalScript(exp, is, globalEnv, pool);
+        const value val = scheme::evalScript(exp, is, globalEnv);
 
         ostringstream vs;
         vs << val;
@@ -70,9 +70,9 @@
         ostringstream os;
         scheme::setupDisplay(os);
 
-        scheme::Env globalEnv = scheme::setupEnvironment(pool);
+        scheme::Env globalEnv = scheme::setupEnvironment();
         const value exp(mklist<value>("storeui_service", string("gettotal")));
-        const value res = scheme::evalScript(exp, is, globalEnv, pool);
+        const value res = scheme::evalScript(exp, is, globalEnv);
 
         ostringstream rs;
         rs << res;



Mime
View raw message