Internals: Move iterators to AstNVisitor to avoid null this.

This commit is contained in:
Wilson Snyder
2018-05-10 20:55:37 -04:00
parent 489f58011b
commit 05db8ce6c8
71 changed files with 1145 additions and 1099 deletions
+5 -5
View File
@@ -89,12 +89,12 @@ private:
virtual void visit(AstNodePslCoverOrAssert* nodep) {
if (nodep->sentreep()) return; // Already processed
clearAssertInfo();
nodep->iterateChildren(*this);
iterateChildren(nodep);
nodep->sentreep(newSenTree(nodep));
clearAssertInfo();
}
virtual void visit(AstPslClocked* nodep) {
nodep->iterateChildren(*this);
iterateChildren(nodep);
if (m_senip) {
nodep->v3error("Unsupported: Only one PSL clock allowed per assertion");
}
@@ -112,12 +112,12 @@ private:
pushDeletep(nodep); VL_DANGLING(nodep);
}
virtual void visit(AstNodeModule* nodep) {
nodep->iterateChildren(*this);
iterateChildren(nodep);
// Reset defaults
m_seniDefaultp = NULL;
}
virtual void visit(AstNode* nodep) {
nodep->iterateChildren(*this);
iterateChildren(nodep);
}
public:
@@ -126,7 +126,7 @@ public:
m_seniDefaultp = NULL;
clearAssertInfo();
// Process
nodep->accept(*this);
iterate(nodep);
}
virtual ~AssertPreVisitor() {}
};