mirror of
https://github.com/verilator/verilator.git
synced 2025-05-04 22:46:57 +00:00
Internal cleanups. No functional change intended
This commit is contained in:
parent
3097d5e093
commit
9ffad7f0db
@ -2374,9 +2374,8 @@ public:
|
|||||||
virtual AstNodeDType* skipRefToEnump() const = 0;
|
virtual AstNodeDType* skipRefToEnump() const = 0;
|
||||||
// (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
// (Slow) recurses - Structure alignment 1,2,4 or 8 bytes (arrays affect this)
|
||||||
virtual int widthAlignBytes() const = 0;
|
virtual int widthAlignBytes() const = 0;
|
||||||
virtual int
|
|
||||||
// (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
// (Slow) recurses - Width in bytes rounding up 1,2,4,8,12,...
|
||||||
widthTotalBytes() const = 0;
|
virtual int widthTotalBytes() const = 0;
|
||||||
virtual bool maybePointedTo() const { return true; }
|
virtual bool maybePointedTo() const { return true; }
|
||||||
// Iff has a non-null refDTypep(), as generic node function
|
// Iff has a non-null refDTypep(), as generic node function
|
||||||
virtual AstNodeDType* virtRefDTypep() const { return NULL; }
|
virtual AstNodeDType* virtRefDTypep() const { return NULL; }
|
||||||
@ -2533,10 +2532,8 @@ public:
|
|||||||
virtual V3Hash sameHash() const {
|
virtual V3Hash sameHash() const {
|
||||||
return V3Hash(V3Hash(m_refDTypep), V3Hash(msb()), V3Hash(lsb()));
|
return V3Hash(V3Hash(m_refDTypep), V3Hash(msb()), V3Hash(lsb()));
|
||||||
}
|
}
|
||||||
AstNodeDType* getChildDTypep() const { return childDTypep(); }
|
virtual AstNodeDType* getChildDTypep() const { return childDTypep(); }
|
||||||
AstNodeDType* childDTypep() const {
|
AstNodeDType* childDTypep() const { return VN_CAST(op1p(), NodeDType); }
|
||||||
return VN_CAST(op1p(), NodeDType);
|
|
||||||
} // op1 = Range of variable
|
|
||||||
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
||||||
virtual AstNodeDType* subDTypep() const { return m_refDTypep ? m_refDTypep : childDTypep(); }
|
virtual AstNodeDType* subDTypep() const { return m_refDTypep ? m_refDTypep : childDTypep(); }
|
||||||
void refDTypep(AstNodeDType* nodep) { m_refDTypep = nodep; }
|
void refDTypep(AstNodeDType* nodep) { m_refDTypep = nodep; }
|
||||||
|
@ -7774,11 +7774,10 @@ public:
|
|||||||
virtual bool cleanOut() const { V3ERROR_NA_RETURN(""); }
|
virtual bool cleanOut() const { V3ERROR_NA_RETURN(""); }
|
||||||
virtual int instrCount() const { return widthInstrs(); }
|
virtual int instrCount() const { return widthInstrs(); }
|
||||||
AstNodeDType* getChildDTypep() const { return childDTypep(); }
|
AstNodeDType* getChildDTypep() const { return childDTypep(); }
|
||||||
AstNodeDType* childDTypep() const {
|
|
||||||
return VN_CAST(op1p(), NodeDType);
|
|
||||||
} // op1 = Type assigning to
|
|
||||||
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
|
||||||
virtual AstNodeDType* subDTypep() const { return dtypep() ? dtypep() : childDTypep(); }
|
virtual AstNodeDType* subDTypep() const { return dtypep() ? dtypep() : childDTypep(); }
|
||||||
|
// op1 = Type assigning to
|
||||||
|
AstNodeDType* childDTypep() const { return VN_CAST(op1p(), NodeDType); }
|
||||||
|
void childDTypep(AstNodeDType* nodep) { setOp1p(nodep); }
|
||||||
AstNode* itemsp() const { return op2p(); } // op2 = AstPatReplicate, AstPatMember, etc
|
AstNode* itemsp() const { return op2p(); } // op2 = AstPatReplicate, AstPatMember, etc
|
||||||
};
|
};
|
||||||
class AstPatMember : public AstNodeMath {
|
class AstPatMember : public AstNodeMath {
|
||||||
|
@ -2371,9 +2371,10 @@ private:
|
|||||||
}
|
}
|
||||||
virtual void visit(AstEnumDType* nodep) VL_OVERRIDE {
|
virtual void visit(AstEnumDType* nodep) VL_OVERRIDE {
|
||||||
iterateChildren(nodep);
|
iterateChildren(nodep);
|
||||||
AstRefDType* refdtype = VN_CAST(nodep->childDTypep(), RefDType);
|
AstRefDType* refdtypep = VN_CAST(nodep->subDTypep(), RefDType);
|
||||||
if (refdtype && (nodep == refdtype->refDTypep()))
|
if (refdtypep && (nodep == refdtypep->subDTypep())) {
|
||||||
refdtype->v3error("Self-referential enumerated type definition");
|
refdtypep->v3error("Self-referential enumerated type definition");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
virtual void visit(AstEnumItemRef* nodep) VL_OVERRIDE {
|
virtual void visit(AstEnumItemRef* nodep) VL_OVERRIDE {
|
||||||
// EnumItemRef may be under a dot. Should already be resolved.
|
// EnumItemRef may be under a dot. Should already be resolved.
|
||||||
|
Loading…
Reference in New Issue
Block a user