mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: More const. No functional change intended.
This commit is contained in:
+5
-5
@@ -180,7 +180,7 @@ private:
|
||||
// See SubstVisitor
|
||||
//
|
||||
// STATE
|
||||
int m_origStep; // Step number where subst was recorded
|
||||
const int m_origStep; // Step number where subst was recorded
|
||||
bool m_ok = true; // No misassignments found
|
||||
|
||||
// METHODS
|
||||
@@ -274,7 +274,7 @@ private:
|
||||
entryp->assignWhole(m_assignStep, nodep);
|
||||
}
|
||||
}
|
||||
} else if (AstWordSel* wordp = VN_CAST(nodep->lhsp(), WordSel)) {
|
||||
} else if (const AstWordSel* const wordp = VN_CAST(nodep->lhsp(), WordSel)) {
|
||||
if (AstVarRef* const varrefp = VN_CAST(wordp->lhsp(), VarRef)) {
|
||||
if (VN_IS(wordp->rhsp(), Const) && isSubstVar(varrefp->varp())) {
|
||||
const int word = VN_AS(wordp->rhsp(), Const)->toUInt();
|
||||
@@ -315,7 +315,7 @@ private:
|
||||
SubstVarEntry* const entryp = getEntryp(varrefp);
|
||||
if (AstNode* const substp = entryp->substWord(nodep, word)) {
|
||||
// Check that the RHS hasn't changed value since we recorded it.
|
||||
SubstUseVisitor visitor{substp, entryp->getWordStep(word)};
|
||||
const SubstUseVisitor visitor{substp, entryp->getWordStep(word)};
|
||||
if (visitor.ok()) {
|
||||
VL_DO_DANGLING(replaceSubstEtc(nodep, substp), nodep);
|
||||
} else {
|
||||
@@ -340,9 +340,9 @@ private:
|
||||
if (nodep->access().isWriteOrRW()) {
|
||||
UINFO(8, " ASSIGNcpx " << nodep << endl);
|
||||
entryp->assignComplex();
|
||||
} else if (AstNode* substp = entryp->substWhole(nodep)) {
|
||||
} else if (AstNode* const substp = entryp->substWhole(nodep)) {
|
||||
// Check that the RHS hasn't changed value since we recorded it.
|
||||
SubstUseVisitor visitor{substp, entryp->getWholeStep()};
|
||||
const SubstUseVisitor visitor{substp, entryp->getWholeStep()};
|
||||
if (visitor.ok()) {
|
||||
UINFO(8, " USEwhole " << nodep << endl);
|
||||
VL_DO_DANGLING(replaceSubstEtc(nodep, substp), nodep);
|
||||
|
||||
Reference in New Issue
Block a user