Internals: Change AstAssignVarScope into AstAliasScope (#6280) (#6512)

Rename and make it derive from AstNode instead of AstNodeAssign.

Small step towards #6280. No functional change.
This commit is contained in:
Geza Lore
2025-09-30 06:40:17 +01:00
committed by GitHub
parent 283810cbf7
commit e04f51ebd2
9 changed files with 25 additions and 34 deletions
+2 -2
View File
@@ -499,7 +499,7 @@ void connectPort(AstNodeModule* modp, AstVar* nodep, AstNodeExpr* pinExprp) {
UINFO(6, "Inlning port variable: " << nodep);
if (nodep->isIfaceRef()) {
modp->addStmtsp(
new AstAssignVarScope{flp, portRef(VAccess::WRITE), pinRef(VAccess::READ)});
new AstAliasScope{flp, portRef(VAccess::WRITE), pinRef(VAccess::READ)});
} else {
AstVarRef* const aliasArgsp = portRef(VAccess::WRITE);
aliasArgsp->addNext(pinRef(VAccess::READ));
@@ -633,7 +633,7 @@ void process(AstNetlist* netlistp, ModuleStateUser1Allocator& moduleStates) {
// Clean up AstIfaceRefDType references
// If the cell has been removed let's make sure we don't leave a
// reference to it. This dtype may still be in use by the
// AstAssignVarScope created earlier but that'll get cleared up later
// AstAliasScope created earlier but that'll get cleared up later
netlistp->typeTablep()->foreach([](AstIfaceRefDType* nodep) {
if (nodep->user1()) nodep->cellp(nullptr);
});