mirror of
https://github.com/verilator/verilator.git
synced 2025-04-29 03:56:58 +00:00
Internals: Misc enum cleanups. No functional change.
This commit is contained in:
parent
a5f2ce0dad
commit
bea34d0ced
@ -1887,7 +1887,7 @@ public:
|
||||
//
|
||||
// Changing the width may confuse the data type resolution, so must clear
|
||||
// TypeTable cache after use.
|
||||
void widthForce(int width, int sized) { m_width = width; m_widthMin = sized; }
|
||||
void widthForce(int width, int widthMin) { m_width = width; m_widthMin = widthMin; }
|
||||
// For backward compatibility inherit width and signing from the subDType/base type
|
||||
void widthFromSub(AstNodeDType* nodep) { m_width = nodep->m_width; m_widthMin = nodep->m_widthMin; m_numeric = nodep->m_numeric; }
|
||||
//
|
||||
|
@ -87,9 +87,7 @@ public:
|
||||
AstConst(FileLine* fl, uint32_t num)
|
||||
: AstNodeMath(fl)
|
||||
, m_num(V3Number(this, 32, num)) {
|
||||
dtypeSetLogicSized(m_num.width(),
|
||||
m_num.sized() ? 0 : m_num.widthMin(),
|
||||
AstNumeric::UNSIGNED);
|
||||
dtypeSetLogicSized(m_num.width(), 0, AstNumeric::UNSIGNED);
|
||||
}
|
||||
class Unsized32 {}; // for creator type-overload selection
|
||||
AstConst(FileLine* fl, Unsized32, uint32_t num) // Unsized 32-bit integer of specified value
|
||||
|
@ -1630,7 +1630,7 @@ private:
|
||||
UASSERT_OBJ(nodep->itemp(), nodep, "Not linked");
|
||||
bool did = false;
|
||||
if (nodep->itemp()->valuep()) {
|
||||
//if (debug()) nodep->varp()->valuep()->dumpTree(cout, " visitvaref: ");
|
||||
//if (debug()) nodep->itemp()->valuep()->dumpTree(cout, " visitvaref: ");
|
||||
iterateAndNextNull(nodep->itemp()->valuep());
|
||||
if (AstConst* valuep = VN_CAST(nodep->itemp()->valuep(), Const)) {
|
||||
const V3Number& num = valuep->num();
|
||||
|
Loading…
Reference in New Issue
Block a user