Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

getting rid of some residual debugging stuff

  • Loading branch information...
commit c52e17cf6c635afbf313a05f813da18226fb96ab 1 parent 1acb88b
@smeiklej smeiklej authored
Showing with 0 additions and 11 deletions.
  1. +0 −2  src/ZKP/Interpreter.cpp
  2. +0 −9 src/ZKP/InterpreterCache.h
View
2  src/ZKP/Interpreter.cpp
@@ -30,7 +30,6 @@ void Interpreter::check(const string &programName, input_map inputs,
// and inputs used
cache_key_pair key = hashForCache(programName,inputs,groups);
if (InterpreterCache::contains(key)) {
- //CacheValue& val = InterpreterCache::get(programName);
CacheValue& val = InterpreterCache::get(key);
// if it has, just store the values and we're done
env = val.env;
@@ -179,7 +178,6 @@ cache_key_pair Interpreter::hashForCache(const string &fname, input_map i,
sort(iNames.begin(),iNames.end());
vector<ZZ> hashInput;
for (unsigned j = 0; j < gNames.size(); j++) {
- cout << gNames[j] << endl;
if (gNames[j] == Environment::NO_GROUP) {
hashInput.push_back(to_ZZ(0));
} else {
View
9 src/ZKP/InterpreterCache.h
@@ -15,14 +15,11 @@ struct CacheValue {
CacheValue() {}
- //CacheValue(ASTNodePtr n, const Environment& e, const input_map& i)
- // : tree(n), env(e), inputs(i) {}
CacheValue(ASTNodePtr n, const Environment& e)
: tree(n), env(e) {}
ASTNodePtr tree;
Environment env;
- //input_map inputs;
};
class InterpreterCache {
@@ -34,24 +31,18 @@ class InterpreterCache {
return _icache;
}
- //typedef boost::unordered_map<string, CacheValue> cache_t;
typedef boost::unordered_map<cache_key_pair, CacheValue> cache_t;
// store values in the cache
static void store(cache_key_pair key, ASTNodePtr n,
Environment &env) {
- //instance().cache[key] = CacheValue(n, env, i);
instance().cache[key] = CacheValue(n, env);
}
- //static bool contains(const string& fname) {
- // return instance().cache.count(fname) != 0;
static bool contains(cache_key_pair key) {
return instance().cache.count(key) != 0;
}
- //static CacheValue& get(const string &fname) {
- // return instance().cache.at(fname);
static CacheValue& get(cache_key_pair key) {
return instance().cache.at(key);
}
Please sign in to comment.
Something went wrong with that request. Please try again.