d_preCache[cur] = curp;
if (!curp.isNull())
{
+ Trace("nconv-debug2")
+ << "..pre-rewrite changed " << cur << " into " << curp << std::endl;
visit.push_back(cur);
visit.push_back(curp);
}
}
else if (it->second.isNull())
{
+ Trace("nconv-debug2") << "..post-visit " << cur << std::endl;
it = d_preCache.find(cur);
Assert(it != d_preCache.end());
if (!it->second.isNull())
Assert(d_cache.find(it->second) != d_cache.end());
Node ret = d_cache[it->second];
addToCache(cur, ret);
+ Trace("nconv-debug2")
+ << "..from cache changed " << cur << " into " << ret << std::endl;
}
else
{
if (childChanged)
{
ret = nm->mkNode(ret.getKind(), children);
+ Trace("nconv-debug2") << "..from children changed " << cur << " into "
+ << ret << std::endl;
}
// run the callback for the current application
Node cret = postConvert(ret);
{
AlwaysAssert(cret.getType().isComparableTo(ret.getType()))
<< "Converting " << ret << " to " << cret << " changes type";
+ Trace("nconv-debug2") << "..post-rewrite changed " << ret << " into "
+ << cret << std::endl;
ret = cret;
}
addToCache(cur, ret);