mirror of
https://github.com/verilator/verilator.git
synced 2025-01-19 12:54:02 +00:00
Internals: Fix number nodep cloning, and assert stays consistent (#4528 partial)
This commit is contained in:
parent
44e7d2ebe6
commit
33787c6add
@ -1053,6 +1053,11 @@ public:
|
||||
const AstConst* const sp = static_cast<const AstConst*>(samep);
|
||||
return num().isCaseEq(sp->num());
|
||||
}
|
||||
void cloneRelink() override { m_num.nodep(this); }
|
||||
const char* broken() const override {
|
||||
BROKEN_RTN(m_num.nodep() && m_num.nodep() != this);
|
||||
return nullptr;
|
||||
}
|
||||
int instrCount() const override { return widthInstrs(); }
|
||||
bool isEqAllOnes() const { return num().isEqAllOnes(width()); }
|
||||
bool isEqAllOnesV() const { return num().isEqAllOnes(widthMinV()); }
|
||||
|
@ -357,6 +357,7 @@ class V3Number final {
|
||||
|
||||
public:
|
||||
void nodep(AstNode* nodep) VL_MT_STABLE;
|
||||
AstNode* nodep() const VL_MT_SAFE { return m_nodep; } // For debug only
|
||||
FileLine* fileline() const VL_MT_SAFE { return m_fileline; }
|
||||
V3Number& setZero();
|
||||
V3Number& setQuad(uint64_t value);
|
||||
|
Loading…
Reference in New Issue
Block a user