Internals: Refactor AstCFunc internals (#6280) (#6578)

- 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:
Geza Lore
2025-10-21 16:37:32 +01:00
committed by GitHub
parent c471323601
commit ec91158130
15 changed files with 89 additions and 85 deletions
-2
View File
@@ -345,8 +345,6 @@ void splitCheck(AstCFunc* ofuncp) {
// Unlink all statements, then add item by item to new sub-functions
AstBegin* const tempp = new AstBegin{ofuncp->fileline(), "[EditWrapper]",
ofuncp->stmtsp()->unlinkFrBackWithNext(), false};
// Currently we do not use finalsp in V3Sched, if we do, it needs to be handled here
UASSERT_OBJ(!ofuncp->finalsp(), ofuncp, "Should not have any finalps");
while (tempp->stmtsp()) {
AstNode* const itemp = tempp->stmtsp()->unlinkFrBack();
const int stmts = itemp->nodeCount();