mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +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
@@ -289,7 +289,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
||||
// Note var can be signed or unsigned based on original number.
|
||||
AstNodeExpr* const countp = nodep->countp()->unlinkFrBackWithNext();
|
||||
const string name = "__Vrepeat"s + cvtToStr(m_modRepeatNum++);
|
||||
AstBegin* const beginp = new AstBegin{nodep->fileline(), "", nullptr, false, true};
|
||||
AstBegin* const beginp = new AstBegin{nodep->fileline(), "", nullptr, true};
|
||||
// Spec says value is integral, if negative is ignored
|
||||
AstVar* const varp
|
||||
= new AstVar{nodep->fileline(), VVarType::BLOCKTEMP, name, nodep->findSigned32DType()};
|
||||
@@ -425,7 +425,7 @@ class LinkJumpVisitor final : public VNVisitor {
|
||||
// Further handling of disable stmt requires all forks to be begin blocks
|
||||
AstBegin* beginp = VN_CAST(forkItemp, Begin);
|
||||
if (!beginp) {
|
||||
beginp = new AstBegin{fl, "", nullptr, false, false};
|
||||
beginp = new AstBegin{fl, "", nullptr, false};
|
||||
forkItemp->replaceWith(beginp);
|
||||
beginp->addStmtsp(forkItemp);
|
||||
// In order to continue the iteration
|
||||
|
||||
Reference in New Issue
Block a user