mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Introduce Ast{class}::Super and cleanup. No functional change intended (but possible if was wrong base used earlier)
This commit is contained in:
@@ -2671,7 +2671,7 @@ public:
|
||||
const string& fsmTag() const { return m_fsmTag; }
|
||||
bool sameNode(const AstNode* samep) const override {
|
||||
const AstCoverOtherDecl* const asamep = VN_DBG_AS(samep, CoverOtherDecl);
|
||||
return AstNodeCoverDecl::sameNode(samep) && linescov() == asamep->linescov();
|
||||
return Super::sameNode(samep) && linescov() == asamep->linescov();
|
||||
}
|
||||
};
|
||||
class AstCoverToggleDecl final : public AstNodeCoverDecl {
|
||||
@@ -2693,7 +2693,7 @@ public:
|
||||
const VNumRange& range() const { return m_range; }
|
||||
bool sameNode(const AstNode* samep) const override {
|
||||
const AstCoverToggleDecl* const asamep = VN_DBG_AS(samep, CoverToggleDecl);
|
||||
return AstNodeCoverDecl::sameNode(samep) && range() == asamep->range();
|
||||
return Super::sameNode(samep) && range() == asamep->range();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+192
-192
File diff suppressed because it is too large
Load Diff
+3
-1
@@ -1096,6 +1096,7 @@ def write_ast_macros(filename):
|
||||
# kind=ptr['kind'])
|
||||
|
||||
emitBlock('''\
|
||||
using Super = Ast{s};
|
||||
Ast{t}* unlinkFrBack(VNRelinker* linkerp = nullptr) {{
|
||||
return static_cast<Ast{t}*>(AstNode::unlinkFrBack(linkerp));
|
||||
}}
|
||||
@@ -1116,7 +1117,8 @@ def write_ast_macros(filename):
|
||||
void dumpTreeJsonOpGen(std::ostream& str, const string& indent) const override;
|
||||
void dumpJsonGen(std::ostream& str) const;
|
||||
''',
|
||||
t=node.name)
|
||||
t=node.name,
|
||||
s=(node.superClass.name if node.superClass else 'AstNode'))
|
||||
if node.ptrs:
|
||||
emitBlock('''\
|
||||
void cloneRelinkGen() override;
|
||||
|
||||
Reference in New Issue
Block a user