summaryrefslogtreecommitdiff
path: root/src/printer/dagification_visitor.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-08-03 20:39:25 +0000
committerMorgan Deters <mdeters@gmail.com>2012-08-03 20:39:25 +0000
commit3daaecd22fe5f6147cb08e5a4e08177b33a2daa2 (patch)
tree46cb65c3673a5678a7779ff970aea9460233f1f1 /src/printer/dagification_visitor.cpp
parente26a44d5f98a9953dffeb07b29a21e7efd501684 (diff)
fix uses of getMetaKind() from outside the expr package. (they now use isConst() and isVar() as appropriate)
also some base infrastructure for the new ::isConst().
Diffstat (limited to 'src/printer/dagification_visitor.cpp')
-rw-r--r--src/printer/dagification_visitor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/printer/dagification_visitor.cpp b/src/printer/dagification_visitor.cpp
index 81183182d..580bec63c 100644
--- a/src/printer/dagification_visitor.cpp
+++ b/src/printer/dagification_visitor.cpp
@@ -53,12 +53,12 @@ bool DagificationVisitor::alreadyVisited(TNode current, TNode parent) {
// the count beyond the threshold already, we've done the same
// for all subexpressions, so it isn't useful to traverse and
// increment again (they'll be dagified anyway).
- return current.getMetaKind() == kind::metakind::VARIABLE ||
- current.getMetaKind() == kind::metakind::CONSTANT ||
+ return current.isVar() ||
+ current.isConst() ||
( ( current.getKind() == kind::NOT ||
current.getKind() == kind::UMINUS ) &&
- ( current[0].getMetaKind() == kind::metakind::VARIABLE ||
- current[0].getMetaKind() == kind::metakind::CONSTANT ) ) ||
+ ( current[0].isVar() ||
+ current[0].isConst() ) ) ||
current.getKind() == kind::SORT_TYPE ||
d_nodeCount[current] > d_threshold;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback