Internals: Minor refactoring of checker parsing/tests. No functional change.

This commit is contained in:
Wilson Snyder
2025-04-06 23:13:24 -04:00
parent c7ff82f06b
commit c8a945f363
8 changed files with 72 additions and 54 deletions
+3 -3
View File
@@ -74,7 +74,7 @@ class DescopeVisitor final : public VNVisitor {
string name = scopep->name();
string::size_type pos;
if ((pos = name.rfind('.')) != string::npos) name.erase(0, pos + 1);
ret.thisPtr = VSelfPointerText{VSelfPointerText::This(), name};
ret.thisPtr = VSelfPointerText{VSelfPointerText::This{}, name};
}
return ret.thisPtr;
}
@@ -104,9 +104,9 @@ class DescopeVisitor final : public VNVisitor {
if (VN_IS(scopep->modp(), Class)) {
// Direct reference to class members are from within the class itself, references from
// outside the class must go via AstMemberSel
return VSelfPointerText{VSelfPointerText::This()};
return VSelfPointerText{VSelfPointerText::This{}};
} else if (relativeRefOk && scopep == m_scopep) {
return VSelfPointerText{VSelfPointerText::This()};
return VSelfPointerText{VSelfPointerText::This{}};
} else if (relativeRefOk && !m_modSingleton && scopep->aboveScopep() == m_scopep
&& VN_IS(scopep->modp(), Module)) {
// Reference to scope of instance directly under this module, can just "this->cell",