After module, clear m_modp as not relevant any longer

This commit is contained in:
Wilson Snyder 2008-11-12 15:32:09 -05:00
parent cfc06ab2a7
commit adefa45fb4
14 changed files with 14 additions and 0 deletions

View File

@ -155,6 +155,7 @@ private:
virtual void visit(AstModule* nodep, AstNUser*) {
m_modp = nodep;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstNodeUniop* nodep, AstNUser*) {
nodep->iterateChildren(*this);

View File

@ -245,6 +245,7 @@ private:
m_modp = nodep;
m_stableNum = 0;
nodep->iterateChildren(*this);
m_modp= NULL;
}
virtual void visit(AstScope* nodep, AstNUser*) {
//UINFO(4," SCOPE "<<nodep<<endl);

View File

@ -407,6 +407,7 @@ private:
nodep->iterateChildren(*this);
m_state = STATE_IDLE;
}
m_modp = NULL;
}
virtual void visit(AstCFunc* nodep, AstNUser*) {
m_funcp = nodep;

View File

@ -85,6 +85,7 @@ private:
m_modp = nodep;
m_funcp = NULL;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCFunc* nodep, AstNUser*) {
m_funcp = nodep;

View File

@ -77,6 +77,7 @@ private:
m_modp = nodep;
m_deepNum = 0;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCFunc* nodep, AstNUser*) {
// We recurse into this.

View File

@ -177,6 +177,7 @@ private:
m_modFuncs.clear();
nodep->iterateChildren(*this);
makePublicFuncWrappers();
m_modp = NULL;
}
virtual void visit(AstScope* nodep, AstNUser*) {
m_scopep = nodep;

View File

@ -78,6 +78,7 @@ class EmitCSyms : EmitCBaseVisitor {
nameCheck(nodep);
m_modp = nodep;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstScope* nodep, AstNUser*) {
nameCheck(nodep);

View File

@ -53,6 +53,7 @@ public:
putbs("module "+modClassName(nodep)+";\n");
nodep->iterateChildren(*this);
puts("endmodule\n");
m_modp = NULL;
}
virtual void visit(AstNodeFTask* nodep, AstNUser*) {
putbs(nodep->castTask() ? "task ":"function ");

View File

@ -316,6 +316,7 @@ private:
m_modp = nodep;
m_activeReducible = true;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstScope* nodep, AstNUser*) {
UINFO(4," SCOPE "<<nodep<<endl);

View File

@ -61,6 +61,7 @@ private:
//if (nodep->name() == "t_chg") m_debug = 9; else m_debug=0;
m_modp = nodep;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCell* nodep, AstNUser*) {
UINFO(4," CELL "<<nodep<<endl);

View File

@ -47,6 +47,7 @@ private:
virtual void visit(AstModule* nodep, AstNUser*) {
m_modp = nodep;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCell* nodep, AstNUser*) {
// Track module depths, so can sort list from parent down to children

View File

@ -461,6 +461,7 @@ private:
virtual void visit(AstModule* nodep, AstNUser*) {
m_modp = nodep;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstScope* nodep, AstNUser*) {
UINFO(4," SCOPE "<<nodep<<endl);

View File

@ -142,6 +142,7 @@ private:
m_modp = nodep;
m_funcp = NULL;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCFunc* nodep, AstNUser*) {
m_funcp = nodep;

View File

@ -70,6 +70,7 @@ private:
m_modp = nodep;
m_constXCvt = true;
nodep->iterateChildren(*this);
m_modp = NULL;
}
virtual void visit(AstCaseItem* nodep, AstNUser*) {
m_constXCvt = false; // Avoid loosing the X's in casex