Internals: Move array definitions to AstArrayDType instead of under AstVars.

Prep work for more complicated data types.
This commit is contained in:
Wilson Snyder
2009-11-04 22:31:53 -05:00
parent db2c6820ee
commit 700c1f836d
35 changed files with 435 additions and 454 deletions
+5 -3
View File
@@ -94,8 +94,8 @@ private:
nodep->iterateChildren(*this);
if (m_counting) {
if (nodep->isUsedClock()) ++m_statVarClock;
if (nodep->arraysp()) ++m_statVarArray;
if (!nodep->arraysp()) m_statVarBytes += nodep->widthTotalBytes();
if (nodep->dtypep()->castArrayDType()) ++m_statVarArray;
else m_statVarBytes += nodep->dtypep()->widthTotalBytes();
if (int(m_statVarWidths.size()) <= nodep->width()) {
m_statVarWidths.resize(nodep->width()+5);
}
@@ -106,7 +106,9 @@ private:
allNodes(nodep);
nodep->iterateChildren(*this);
if (m_counting) {
if (!nodep->varp()->arraysp()) m_statVarScpBytes += nodep->varp()->widthTotalBytes();
if (nodep->varp()->dtypep()->castBasicDType()) {
m_statVarScpBytes += nodep->varp()->dtypep()->widthTotalBytes();
}
}
}
virtual void visit(AstNodeIf* nodep, AstNUser*) {