mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Refactor generate construct Ast handling (#6280) We introduce AstNodeGen, the common base class of AstGenBlock, AstGenCase, AstGenFor, and AstGenIf, which together represent all SV generate constructs. Subsequently remove AstNodeFor, AstNodeCase (AstCase is now directly derived from AstNodeStmt) and adjust internals to work on the new representation. Output is identical modulo hashes do to changed AstNode type ids, no functional change intended. Step towards #6280.
This commit is contained in:
+2
-2
@@ -231,7 +231,7 @@ private:
|
||||
AstBegin* const beginp = new AstBegin{
|
||||
forkp->fileline(),
|
||||
"_Vwrapped_" + (forkp->name().empty() ? "" : forkp->name() + "_") + cvtToStr(m_id),
|
||||
m_instance.m_handlep, false, true};
|
||||
m_instance.m_handlep, true};
|
||||
forkHandle.relink(beginp);
|
||||
|
||||
AstNode* const instAsgnp = instantiateDynScope(memberMap);
|
||||
@@ -470,7 +470,7 @@ class DynScopeVisitor final : public VNVisitor {
|
||||
})) {
|
||||
nodep->user2(true);
|
||||
// Put it in a fork to prevent lifetime issues with the local
|
||||
AstBegin* const beginp = new AstBegin{nodep->fileline(), "", nullptr, false, false};
|
||||
AstBegin* const beginp = new AstBegin{nodep->fileline(), "", nullptr, false};
|
||||
AstFork* const forkp = new AstFork{nodep->fileline(), "", beginp};
|
||||
forkp->joinType(VJoinType::JOIN_NONE);
|
||||
nodep->replaceWith(forkp);
|
||||
|
||||
Reference in New Issue
Block a user