mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +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
-1
@@ -54,6 +54,8 @@ private:
|
||||
// NODE STATE
|
||||
// AstModule::user4() // bool True if parameters numbered
|
||||
// AstVar::user4() // int Global parameter number (for naming new module)
|
||||
AstUser4InUse m_inuse4;
|
||||
|
||||
// STATE
|
||||
typedef std::map<AstVar*,AstVar*> VarCloneMap;
|
||||
struct ModInfo {
|
||||
@@ -111,7 +113,6 @@ private:
|
||||
|
||||
// VISITORS
|
||||
virtual void visit(AstNetlist* nodep, AstNUser*) {
|
||||
AstNode::user4ClearTree();
|
||||
// Modules must be done in top-down-order
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user