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:
Wilson Snyder
2008-11-21 15:50:33 -05:00
parent 7ad29c6329
commit 8b77379e2c
43 changed files with 214 additions and 68 deletions
+1
View File
@@ -671,6 +671,7 @@ private:
else if (!m_cpp && nodep->lhsp()->castConcat()) {
bool need_temp = false;
if (m_warn && !nodep->castAssignDly()) { // Is same var on LHS and RHS?
AstUserInUse m_inuse1;
ConstVarMarkVisitor mark(nodep->lhsp());
ConstVarFindVisitor find(nodep->rhsp());
if (find.found()) need_temp = true;