mirror of
https://github.com/verilator/verilator.git
synced 2026-10-05 17:43:31 +02:00
Internal coding: Assert that user#() don't overlap.
Any use of a user() must now be declared, generally in the Visitor class with
AstUser#InUse arbitrary_object
This lets the code track if there's another request for the same user(),
preventing nasty hard to debug cases where they overlap. This will also
call user#ClearTree(), so a bunch of those were removed, though many
extranious ones still remain.
This commit is contained in:
+2
-2
@@ -47,6 +47,8 @@ private:
|
||||
// Entire netlist:
|
||||
// AstNode::user() -> CleanState. For this node, 0==UNKNOWN
|
||||
// AstNode::user2() -> bool. True indicates minWidth has been propagated
|
||||
AstUserInUse m_inuse1;
|
||||
AstUser2InUse m_inuse2;
|
||||
|
||||
// STATE
|
||||
AstModule* m_modp;
|
||||
@@ -257,8 +259,6 @@ public:
|
||||
CleanVisitor() {}
|
||||
virtual ~CleanVisitor() {}
|
||||
void main(AstNetlist* nodep) {
|
||||
AstNode::userClearTree(); // userp() used on entire tree
|
||||
AstNode::user2ClearTree(); // userp() used on entire tree
|
||||
nodep->accept(*this);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user