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:
+3
-1
@@ -98,6 +98,9 @@ private:
|
||||
// AstVarScope::user() -> Sequence # of first virtex setting this var.
|
||||
// AstVarScope::user2() -> Sequence # of last consumption of this var
|
||||
// AstVarScope::user4() -> AstVarScope*: Passed to LifePostElim to substitute this var
|
||||
AstUserInUse m_inuse1;
|
||||
AstUser2InUse m_inuse2;
|
||||
AstUser4InUse m_inuse4;
|
||||
|
||||
// STATE
|
||||
uint32_t m_sequence; // Sequence number of assignments/varrefs
|
||||
@@ -107,7 +110,6 @@ private:
|
||||
virtual void visit(AstTopScope* nodep, AstNUser*) {
|
||||
AstNode::userClearTree(); // userp() used on entire tree
|
||||
AstNode::user2ClearTree(); // userp() used on entire tree
|
||||
AstNode::user3ClearTree(); // userp() used on entire tree
|
||||
AstNode::user4ClearTree(); // userp() used on entire tree
|
||||
m_sequence = 0;
|
||||
nodep->iterateChildren(*this);
|
||||
|
||||
Reference in New Issue
Block a user