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:
+1
-1
@@ -70,6 +70,7 @@ private:
|
||||
// AstModule::user() -> int. Count of number of cells referencing this module.
|
||||
// AstVar::user() -> int. Count of number of references
|
||||
// AstVarScope::user() -> int. Count of number of references
|
||||
AstUserInUse m_inuse1;
|
||||
|
||||
// TYPES
|
||||
typedef multimap<AstVarScope*,AstNodeAssign*> AssignMap;
|
||||
@@ -188,7 +189,6 @@ public:
|
||||
m_elimUserVars = elimUserVars;
|
||||
m_sideEffect = false;
|
||||
// Operate on whole netlist
|
||||
AstNode::userClearTree(); // userp() used on entire tree
|
||||
nodep->accept(*this);
|
||||
deadCheckVar();
|
||||
// Modules after vars, because might be vars we delete inside a mod we delete
|
||||
|
||||
Reference in New Issue
Block a user