Internals: Use VL_RESTORER class to save/restore vars. No functional change intended.

This commit is contained in:
Wilson Snyder
2020-08-24 21:13:28 -04:00
parent 4265f9499d
commit bed3101dfc
42 changed files with 253 additions and 364 deletions
+2 -4
View File
@@ -75,22 +75,20 @@ private:
classScopep->aboveScopep(), classScopep->aboveCellp());
packagep->addStmtp(scopep);
// Iterate
string prevPrefix = m_prefix;
VL_RESTORER(m_prefix);
{
m_classScopep = classScopep;
m_prefix = nodep->name() + "__02e"; // .
iterateChildren(nodep);
}
m_prefix = prevPrefix;
m_classScopep = nullptr;
}
virtual void visit(AstPackage* nodep) override {
string prevPrefix = m_prefix;
VL_RESTORER(m_prefix);
{
m_prefix = nodep->name() + "__03a__03a"; // ::
iterateChildren(nodep);
}
m_prefix = prevPrefix;
}
virtual void visit(AstVar* nodep) override {