mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
- Delete 'finalsp'. It was used in one place, basically unnecessary and safe to remove. - Make 'argsp' a 'List[AstVar]'. This held before. It holds the function argument and return variables. - Replace 'intitsp' with 'varsp' and make it into 'List[AstVar]' to hold the function local variables. This was most of its use before. The few places we inserted statements here now moved into 'stmtsp' by inserting at the front of the list.
This commit is contained in:
+8
-1
@@ -836,7 +836,14 @@ class TimingControlVisitor final : public VNVisitor {
|
||||
|
||||
nodep->rtnType("VlCoroutine");
|
||||
// If in a class, create a shared pointer to 'this'
|
||||
if (m_classp) nodep->addInitsp(new AstCStmt{nodep->fileline(), "VL_KEEP_THIS;"});
|
||||
if (m_classp) {
|
||||
AstCStmt* const cstmtp = new AstCStmt{nodep->fileline(), "VL_KEEP_THIS;"};
|
||||
if (AstNode* const stmtsp = nodep->stmtsp()) {
|
||||
stmtsp->addHereThisAsNext(cstmtp);
|
||||
} else {
|
||||
nodep->addStmtsp(cstmtp);
|
||||
}
|
||||
}
|
||||
AstNode* firstCoStmtp = nullptr; // First co_* statement in the function
|
||||
nodep->exists([&](AstCAwait* const awaitp) -> bool { return (firstCoStmtp = awaitp); });
|
||||
if (!firstCoStmtp) {
|
||||
|
||||
Reference in New Issue
Block a user