mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Generate AstNode accessors via astgen
Introduce the @astgen directives parsed by astgen, currently used for the generation child node (operand) accessors. Please see the updated internal documentation for details.
This commit is contained in:
+2
-2
@@ -176,7 +176,7 @@ private:
|
||||
iterateAndNextNull(nodep->condp());
|
||||
m_inWhilep = nullptr;
|
||||
startStatement(nodep);
|
||||
iterateAndNextNull(nodep->bodysp());
|
||||
iterateAndNextNull(nodep->stmtsp());
|
||||
iterateAndNextNull(nodep->incsp());
|
||||
m_stmtp = nullptr;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ private:
|
||||
}
|
||||
void visit(AstNodeCond* nodep) override {
|
||||
iterateChildren(nodep);
|
||||
if (nodep->expr1p()->isWide() && !VN_IS(nodep->condp(), Const)
|
||||
if (nodep->thenp()->isWide() && !VN_IS(nodep->condp(), Const)
|
||||
&& !VN_IS(nodep->condp(), VarRef)) {
|
||||
// We're going to need the expression several times in the expanded code,
|
||||
// so might as well make it a common expression
|
||||
|
||||
Reference in New Issue
Block a user