From adefa45fb40a3e0ec4e652a07bfa55d199429846 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Wed, 12 Nov 2008 15:32:09 -0500 Subject: [PATCH] After module, clear m_modp as not relevant any longer --- src/V3Clean.cpp | 1 + src/V3Clock.cpp | 1 + src/V3Combine.cpp | 1 + src/V3Depth.cpp | 1 + src/V3DepthBlock.cpp | 1 + src/V3Descope.cpp | 1 + src/V3EmitCSyms.cpp | 1 + src/V3EmitV.cpp | 1 + src/V3Gate.cpp | 1 + src/V3Inst.cpp | 1 + src/V3LinkLevel.cpp | 1 + src/V3Order.cpp | 1 + src/V3Premit.cpp | 1 + src/V3Unknown.cpp | 1 + 14 files changed, 14 insertions(+) diff --git a/src/V3Clean.cpp b/src/V3Clean.cpp index 0d0d5e76d..8d5fbcf50 100644 --- a/src/V3Clean.cpp +++ b/src/V3Clean.cpp @@ -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); diff --git a/src/V3Clock.cpp b/src/V3Clock.cpp index 23a66a8c6..da7cc5a67 100644 --- a/src/V3Clock.cpp +++ b/src/V3Clock.cpp @@ -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 "<iterateChildren(*this); m_state = STATE_IDLE; } + m_modp = NULL; } virtual void visit(AstCFunc* nodep, AstNUser*) { m_funcp = nodep; diff --git a/src/V3Depth.cpp b/src/V3Depth.cpp index f2455bee7..5eedd81b5 100644 --- a/src/V3Depth.cpp +++ b/src/V3Depth.cpp @@ -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; diff --git a/src/V3DepthBlock.cpp b/src/V3DepthBlock.cpp index 0ef77ed0f..b1b56b0a3 100644 --- a/src/V3DepthBlock.cpp +++ b/src/V3DepthBlock.cpp @@ -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. diff --git a/src/V3Descope.cpp b/src/V3Descope.cpp index 42753db40..1b6e18068 100644 --- a/src/V3Descope.cpp +++ b/src/V3Descope.cpp @@ -177,6 +177,7 @@ private: m_modFuncs.clear(); nodep->iterateChildren(*this); makePublicFuncWrappers(); + m_modp = NULL; } virtual void visit(AstScope* nodep, AstNUser*) { m_scopep = nodep; diff --git a/src/V3EmitCSyms.cpp b/src/V3EmitCSyms.cpp index bce113335..04b0e2ecd 100644 --- a/src/V3EmitCSyms.cpp +++ b/src/V3EmitCSyms.cpp @@ -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); diff --git a/src/V3EmitV.cpp b/src/V3EmitV.cpp index ae5c9625a..ef57ab2b7 100644 --- a/src/V3EmitV.cpp +++ b/src/V3EmitV.cpp @@ -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 "); diff --git a/src/V3Gate.cpp b/src/V3Gate.cpp index 845110b16..fe5d7eac3 100644 --- a/src/V3Gate.cpp +++ b/src/V3Gate.cpp @@ -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 "<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 "<iterateChildren(*this); + m_modp = NULL; } virtual void visit(AstCell* nodep, AstNUser*) { // Track module depths, so can sort list from parent down to children diff --git a/src/V3Order.cpp b/src/V3Order.cpp index f68c0b5eb..79b3eadc6 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -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 "<iterateChildren(*this); + m_modp = NULL; } virtual void visit(AstCFunc* nodep, AstNUser*) { m_funcp = nodep; diff --git a/src/V3Unknown.cpp b/src/V3Unknown.cpp index c380a3e2f..2025a7211 100644 --- a/src/V3Unknown.cpp +++ b/src/V3Unknown.cpp @@ -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