mirror of
https://github.com/verilator/verilator.git
synced 2025-04-25 10:06:54 +00:00
Visitors that just accept netlists should say so. No functional change
This commit is contained in:
parent
9499047f8e
commit
03c5d06107
@ -364,7 +364,7 @@ private:
|
||||
}
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
ActiveVisitor(AstNode* nodep) {
|
||||
ActiveVisitor(AstNetlist* nodep) {
|
||||
m_scopeFinalp = NULL;
|
||||
m_alwaysp = NULL;
|
||||
m_itemCombo = false;
|
||||
|
@ -262,11 +262,10 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
CleanVisitor() {}
|
||||
virtual ~CleanVisitor() {}
|
||||
void main(AstNetlist* nodep) {
|
||||
CleanVisitor(AstNetlist* nodep) {
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~CleanVisitor() {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -274,6 +273,5 @@ public:
|
||||
|
||||
void V3Clean::cleanAll(AstNetlist* nodep) {
|
||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||
CleanVisitor visitor;
|
||||
visitor.main(nodep);
|
||||
CleanVisitor visitor (nodep);
|
||||
}
|
||||
|
@ -280,8 +280,7 @@ private:
|
||||
virtual void visit(AstAlways* nodep, AstNUser*) {
|
||||
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
|
||||
nodep->replaceWith(cmtp);
|
||||
AstNode* stmtsp = nodep->bodysp();
|
||||
if (stmtsp) {
|
||||
if (AstNode* stmtsp = nodep->bodysp()) {
|
||||
stmtsp->unlinkFrBackWithNext();
|
||||
cmtp->addNextHere(stmtsp);
|
||||
}
|
||||
@ -290,8 +289,7 @@ private:
|
||||
virtual void visit(AstAlwaysPost* nodep, AstNUser*) {
|
||||
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
|
||||
nodep->replaceWith(cmtp);
|
||||
AstNode* stmtsp = nodep->bodysp();
|
||||
if (stmtsp) {
|
||||
if (AstNode* stmtsp = nodep->bodysp()) {
|
||||
stmtsp->unlinkFrBackWithNext();
|
||||
cmtp->addNextHere(stmtsp);
|
||||
}
|
||||
@ -320,8 +318,7 @@ private:
|
||||
virtual void visit(AstInitial* nodep, AstNUser*) {
|
||||
AstNode* cmtp = new AstComment(nodep->fileline(), nodep->typeName());
|
||||
nodep->replaceWith(cmtp);
|
||||
AstNode* stmtsp = nodep->bodysp();
|
||||
if (stmtsp) {
|
||||
if (AstNode* stmtsp = nodep->bodysp()) {
|
||||
stmtsp->unlinkFrBackWithNext();
|
||||
cmtp->addNextHere(stmtsp);
|
||||
}
|
||||
@ -534,7 +531,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
ClockVisitor(AstNode* nodep) {
|
||||
ClockVisitor(AstNetlist* nodep) {
|
||||
m_modp=NULL; m_activep=NULL;
|
||||
m_evalFuncp = NULL;
|
||||
m_topScopep=NULL;
|
||||
|
@ -59,7 +59,7 @@ public:
|
||||
// CONSTUCTORS
|
||||
ConstVarMarkVisitor(AstNode* nodep) {
|
||||
AstNode::user4ClearTree(); // Check marked InUse before we're called
|
||||
nodep->iterateAndNext(*this, NULL);
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~ConstVarMarkVisitor() {}
|
||||
};
|
||||
|
@ -441,7 +441,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
DelayedVisitor(AstNode* nodep) {
|
||||
DelayedVisitor(AstNetlist* nodep) {
|
||||
m_inDly = false;
|
||||
m_activep=NULL;
|
||||
m_cfuncp=NULL;
|
||||
|
@ -156,7 +156,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
DepthVisitor(AstNode* nodep) {
|
||||
DepthVisitor(AstNetlist* nodep) {
|
||||
m_modp=NULL;
|
||||
m_funcp=NULL;
|
||||
m_stmtp=NULL;
|
||||
|
@ -126,7 +126,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
DepthBlockVisitor(AstNode* nodep) {
|
||||
DepthBlockVisitor(AstNetlist* nodep) {
|
||||
m_modp=NULL;
|
||||
m_depth=0;
|
||||
//
|
||||
|
@ -905,13 +905,11 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
ExpandVisitor() {
|
||||
ExpandVisitor(AstNetlist* nodep) {
|
||||
m_stmtp=NULL;
|
||||
}
|
||||
virtual ~ExpandVisitor() {}
|
||||
void main(AstNode* nodep) {
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~ExpandVisitor() {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -922,6 +920,5 @@ public:
|
||||
|
||||
void V3Expand::expandAll(AstNetlist* nodep) {
|
||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||
ExpandVisitor visitor;
|
||||
visitor.main(nodep);
|
||||
ExpandVisitor visitor (nodep);
|
||||
}
|
||||
|
@ -258,15 +258,13 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
LinkCellsVisitor() {
|
||||
LinkCellsVisitor(AstNetlist* rootp) {
|
||||
m_modp = NULL;
|
||||
m_libVertexp = NULL;
|
||||
m_topVertexp = NULL;
|
||||
}
|
||||
virtual ~LinkCellsVisitor() {}
|
||||
void main(AstNetlist* rootp) {
|
||||
rootp->accept(*this);
|
||||
}
|
||||
virtual ~LinkCellsVisitor() {}
|
||||
};
|
||||
|
||||
//######################################################################
|
||||
@ -274,6 +272,5 @@ public:
|
||||
|
||||
void V3LinkCells::link(AstNetlist* rootp) {
|
||||
UINFO(4,__FUNCTION__<<": "<<endl);
|
||||
LinkCellsVisitor visitor;
|
||||
visitor.main(rootp);
|
||||
LinkCellsVisitor visitor (rootp);
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ private:
|
||||
}
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
NameVisitor(AstNode* nodep) {
|
||||
NameVisitor(AstNetlist* nodep) {
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~NameVisitor() {}
|
||||
|
@ -306,17 +306,15 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
PremitVisitor() {
|
||||
PremitVisitor(AstNetlist* nodep) {
|
||||
m_modp = NULL;
|
||||
m_funcp = NULL;
|
||||
m_stmtp = NULL;
|
||||
m_inWhilep = NULL;
|
||||
m_inTracep = NULL;
|
||||
}
|
||||
virtual ~PremitVisitor() {}
|
||||
void main(AstNode* nodep) {
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~PremitVisitor() {}
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
@ -327,6 +325,5 @@ public:
|
||||
|
||||
void V3Premit::premitAll(AstNetlist* nodep) {
|
||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||
PremitVisitor visitor;
|
||||
visitor.main(nodep);
|
||||
PremitVisitor visitor (nodep);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ private:
|
||||
}
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
ScopeVisitor(AstNode* nodep) {
|
||||
ScopeVisitor(AstNetlist* nodep) {
|
||||
m_aboveCellp = NULL;
|
||||
m_aboveScopep = NULL;
|
||||
m_modp = NULL;
|
||||
@ -313,7 +313,7 @@ private:
|
||||
}
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
ScopeCleanupVisitor(AstNode* nodep) {
|
||||
ScopeCleanupVisitor(AstNetlist* nodep) {
|
||||
m_scopep = NULL;
|
||||
nodep->accept(*this);
|
||||
}
|
||||
|
@ -548,7 +548,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
SplitVisitor(AstNode* nodep, bool reorder)
|
||||
SplitVisitor(AstNetlist* nodep, bool reorder)
|
||||
: m_reorder(reorder) {
|
||||
scoreboardClear();
|
||||
nodep->accept(*this);
|
||||
|
@ -377,7 +377,7 @@ private:
|
||||
|
||||
public:
|
||||
// CONSTUCTORS
|
||||
UnknownVisitor(AstNode* nodep) {
|
||||
UnknownVisitor(AstNetlist* nodep) {
|
||||
nodep->accept(*this);
|
||||
}
|
||||
virtual ~UnknownVisitor() {
|
||||
|
@ -1197,7 +1197,7 @@ void V3Width::widthSignedIfNotAlready(AstNode* nodep) {
|
||||
}
|
||||
}
|
||||
|
||||
void V3Width::widthCommit(AstNode* nodep) {
|
||||
void V3Width::widthCommit(AstNetlist* nodep) {
|
||||
UINFO(2,__FUNCTION__<<": "<<endl);
|
||||
WidthCommitVisitor visitor (nodep);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
static void widthParams(AstNode* nodep);
|
||||
static void widthSignedIfNotAlready(AstNode* nodep);
|
||||
// Final step... Mark all widths as equal
|
||||
static void widthCommit(AstNode* nodep);
|
||||
static void widthCommit(AstNetlist* nodep);
|
||||
};
|
||||
|
||||
#endif // Guard
|
||||
|
Loading…
Reference in New Issue
Block a user