Internals: Fix misnamed member. No functional change.
This commit is contained in:
parent
19f7279542
commit
05d04a3959
|
|
@ -139,7 +139,7 @@ private:
|
||||||
const VNUser2InUse m_inuser2;
|
const VNUser2InUse m_inuser2;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
VMemberMap memberMap; // Member names cached for fast lookup
|
VMemberMap m_memberMap; // Member names cached for fast lookup
|
||||||
AstNodeModule* m_modp = nullptr; // Current module
|
AstNodeModule* m_modp = nullptr; // Current module
|
||||||
const AstNodeFTask* m_ftaskp = nullptr; // Current function/task
|
const AstNodeFTask* m_ftaskp = nullptr; // Current function/task
|
||||||
size_t m_enumValueTabCount = 0; // Number of tables with enum values created
|
size_t m_enumValueTabCount = 0; // Number of tables with enum values created
|
||||||
|
|
@ -215,7 +215,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void addPrePostCall(AstClass* classp, AstFunc* funcp, const string& name) {
|
void addPrePostCall(AstClass* classp, AstFunc* funcp, const string& name) {
|
||||||
if (AstTask* userFuncp = VN_CAST(memberMap.findMember(classp, name), Task)) {
|
if (AstTask* userFuncp = VN_CAST(m_memberMap.findMember(classp, name), Task)) {
|
||||||
AstTaskRef* const callp
|
AstTaskRef* const callp
|
||||||
= new AstTaskRef{userFuncp->fileline(), userFuncp->name(), nullptr};
|
= new AstTaskRef{userFuncp->fileline(), userFuncp->name(), nullptr};
|
||||||
callp->taskp(userFuncp);
|
callp->taskp(userFuncp);
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ private:
|
||||||
const VNUser5InUse m_user5InUse;
|
const VNUser5InUse m_user5InUse;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
VMemberMap memberMap; // Member names cached for fast lookup
|
VMemberMap m_memberMap; // Member names cached for fast lookup
|
||||||
AstClass* m_classp = nullptr; // Current class
|
AstClass* m_classp = nullptr; // Current class
|
||||||
AstNode* m_procp = nullptr; // NodeProcedure/CFunc/Begin we're under
|
AstNode* m_procp = nullptr; // NodeProcedure/CFunc/Begin we're under
|
||||||
uint8_t m_underFork = F_NONE; // F_NONE or flags of a fork we are under
|
uint8_t m_underFork = F_NONE; // F_NONE or flags of a fork we are under
|
||||||
|
|
@ -265,7 +265,7 @@ private:
|
||||||
// the root of the inheritance hierarchy and check if the original method is
|
// the root of the inheritance hierarchy and check if the original method is
|
||||||
// virtual or not.
|
// virtual or not.
|
||||||
if (auto* const overriddenp
|
if (auto* const overriddenp
|
||||||
= VN_CAST(memberMap.findMember(cextp->classp(), nodep->name()), CFunc)) {
|
= VN_CAST(m_memberMap.findMember(cextp->classp(), nodep->name()), CFunc)) {
|
||||||
// Suspendability and process affects typing, so they propagate both ways
|
// Suspendability and process affects typing, so they propagate both ways
|
||||||
DepVtx* const overriddenSVxp = getSuspendDepVtx(overriddenp);
|
DepVtx* const overriddenSVxp = getSuspendDepVtx(overriddenp);
|
||||||
DepVtx* const overriddenPVxp = getNeedsProcDepVtx(overriddenp);
|
DepVtx* const overriddenPVxp = getNeedsProcDepVtx(overriddenp);
|
||||||
|
|
|
||||||
|
|
@ -223,7 +223,7 @@ private:
|
||||||
using DTypeMap = std::map<const std::string, AstPatMember*>;
|
using DTypeMap = std::map<const std::string, AstPatMember*>;
|
||||||
|
|
||||||
// STATE
|
// STATE
|
||||||
VMemberMap memberMap; // Member names cached for fast lookup
|
VMemberMap m_memberMap; // Member names cached for fast lookup
|
||||||
WidthVP* m_vup = nullptr; // Current node state
|
WidthVP* m_vup = nullptr; // Current node state
|
||||||
const AstCell* m_cellp = nullptr; // Current cell for arrayed instantiations
|
const AstCell* m_cellp = nullptr; // Current cell for arrayed instantiations
|
||||||
const AstEnumItem* m_enumItemp = nullptr; // Current enum item
|
const AstEnumItem* m_enumItemp = nullptr; // Current enum item
|
||||||
|
|
@ -2640,7 +2640,8 @@ private:
|
||||||
AstPackage* const packagep = getItemPackage(nodep);
|
AstPackage* const packagep = getItemPackage(nodep);
|
||||||
if (packagep && packagep->name() == "std") {
|
if (packagep && packagep->name() == "std") {
|
||||||
// Change type of m_process to VlProcessRef
|
// Change type of m_process to VlProcessRef
|
||||||
if (AstVar* const varp = VN_CAST(memberMap.findMember(nodep, "m_process"), Var)) {
|
if (AstVar* const varp
|
||||||
|
= VN_CAST(m_memberMap.findMember(nodep, "m_process"), Var)) {
|
||||||
AstNodeDType* const dtypep = varp->getChildDTypep();
|
AstNodeDType* const dtypep = varp->getChildDTypep();
|
||||||
if (!varp->dtypep()) {
|
if (!varp->dtypep()) {
|
||||||
VL_DO_DANGLING(pushDeletep(dtypep->unlinkFrBack()), dtypep);
|
VL_DO_DANGLING(pushDeletep(dtypep->unlinkFrBack()), dtypep);
|
||||||
|
|
@ -2652,7 +2653,7 @@ private:
|
||||||
}
|
}
|
||||||
// Mark that self requires process instance
|
// Mark that self requires process instance
|
||||||
if (AstNodeFTask* const ftaskp
|
if (AstNodeFTask* const ftaskp
|
||||||
= VN_CAST(memberMap.findMember(nodep, "self"), NodeFTask)) {
|
= VN_CAST(m_memberMap.findMember(nodep, "self"), NodeFTask)) {
|
||||||
ftaskp->setNeedProcess();
|
ftaskp->setNeedProcess();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2761,7 +2762,7 @@ private:
|
||||||
AstClass* const first_classp = adtypep->classp();
|
AstClass* const first_classp = adtypep->classp();
|
||||||
UASSERT_OBJ(first_classp, nodep, "Unlinked");
|
UASSERT_OBJ(first_classp, nodep, "Unlinked");
|
||||||
for (AstClass* classp = first_classp; classp;) {
|
for (AstClass* classp = first_classp; classp;) {
|
||||||
if (AstNode* const foundp = memberMap.findMember(classp, nodep->name())) {
|
if (AstNode* const foundp = m_memberMap.findMember(classp, nodep->name())) {
|
||||||
if (AstVar* const varp = VN_CAST(foundp, Var)) {
|
if (AstVar* const varp = VN_CAST(foundp, Var)) {
|
||||||
if (!varp->didWidth()) userIterate(varp, nullptr);
|
if (!varp->didWidth()) userIterate(varp, nullptr);
|
||||||
if (varp->lifetime().isStatic()) {
|
if (varp->lifetime().isStatic()) {
|
||||||
|
|
@ -2837,7 +2838,7 @@ private:
|
||||||
bool memberSelStruct(AstMemberSel* nodep, AstNodeUOrStructDType* adtypep) {
|
bool memberSelStruct(AstMemberSel* nodep, AstNodeUOrStructDType* adtypep) {
|
||||||
// Returns true if ok
|
// Returns true if ok
|
||||||
if (AstMemberDType* const memberp
|
if (AstMemberDType* const memberp
|
||||||
= VN_CAST(memberMap.findMember(adtypep, nodep->name()), MemberDType)) {
|
= VN_CAST(m_memberMap.findMember(adtypep, nodep->name()), MemberDType)) {
|
||||||
if (m_attrp) { // Looking for the base of the attribute
|
if (m_attrp) { // Looking for the base of the attribute
|
||||||
nodep->dtypep(memberp);
|
nodep->dtypep(memberp);
|
||||||
UINFO(9, " MEMBERSEL(attr) -> " << nodep << endl);
|
UINFO(9, " MEMBERSEL(attr) -> " << nodep << endl);
|
||||||
|
|
@ -3500,10 +3501,10 @@ private:
|
||||||
AstClass* const first_classp = adtypep->classp();
|
AstClass* const first_classp = adtypep->classp();
|
||||||
if (nodep->name() == "randomize") {
|
if (nodep->name() == "randomize") {
|
||||||
V3Randomize::newRandomizeFunc(first_classp);
|
V3Randomize::newRandomizeFunc(first_classp);
|
||||||
memberMap.clear();
|
m_memberMap.clear();
|
||||||
} else if (nodep->name() == "srandom") {
|
} else if (nodep->name() == "srandom") {
|
||||||
V3Randomize::newSRandomFunc(first_classp);
|
V3Randomize::newSRandomFunc(first_classp);
|
||||||
memberMap.clear();
|
m_memberMap.clear();
|
||||||
}
|
}
|
||||||
UASSERT_OBJ(first_classp, nodep, "Unlinked");
|
UASSERT_OBJ(first_classp, nodep, "Unlinked");
|
||||||
for (AstClass* classp = first_classp; classp;) {
|
for (AstClass* classp = first_classp; classp;) {
|
||||||
|
|
@ -3526,7 +3527,7 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (AstNodeFTask* const ftaskp
|
if (AstNodeFTask* const ftaskp
|
||||||
= VN_CAST(memberMap.findMember(classp, nodep->name()), NodeFTask)) {
|
= VN_CAST(m_memberMap.findMember(classp, nodep->name()), NodeFTask)) {
|
||||||
userIterate(ftaskp, nullptr);
|
userIterate(ftaskp, nullptr);
|
||||||
if (ftaskp->lifetime().isStatic()) {
|
if (ftaskp->lifetime().isStatic()) {
|
||||||
AstNodeExpr* argsp = nullptr;
|
AstNodeExpr* argsp = nullptr;
|
||||||
|
|
@ -3795,7 +3796,8 @@ private:
|
||||||
|
|
||||||
classp = refp->classp();
|
classp = refp->classp();
|
||||||
UASSERT_OBJ(classp, nodep, "Unlinked");
|
UASSERT_OBJ(classp, nodep, "Unlinked");
|
||||||
if (AstNodeFTask* const ftaskp = VN_CAST(memberMap.findMember(classp, "new"), Func)) {
|
if (AstNodeFTask* const ftaskp
|
||||||
|
= VN_CAST(m_memberMap.findMember(classp, "new"), Func)) {
|
||||||
nodep->taskp(ftaskp);
|
nodep->taskp(ftaskp);
|
||||||
nodep->classOrPackagep(classp);
|
nodep->classOrPackagep(classp);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -3963,7 +3965,7 @@ private:
|
||||||
// '{member:value} or '{data_type: default_value}
|
// '{member:value} or '{data_type: default_value}
|
||||||
if (const AstText* textp = VN_CAST(patp->keyp(), Text)) {
|
if (const AstText* textp = VN_CAST(patp->keyp(), Text)) {
|
||||||
// member: value
|
// member: value
|
||||||
memp = VN_CAST(memberMap.findMember(vdtypep, textp->text()),
|
memp = VN_CAST(m_memberMap.findMember(vdtypep, textp->text()),
|
||||||
MemberDType);
|
MemberDType);
|
||||||
if (!memp) {
|
if (!memp) {
|
||||||
patp->keyp()->v3error("Assignment pattern key '"
|
patp->keyp()->v3error("Assignment pattern key '"
|
||||||
|
|
@ -5609,10 +5611,10 @@ private:
|
||||||
UASSERT_OBJ(classp, nodep, "Should have failed in V3LinkDot");
|
UASSERT_OBJ(classp, nodep, "Should have failed in V3LinkDot");
|
||||||
if (nodep->name() == "randomize") {
|
if (nodep->name() == "randomize") {
|
||||||
nodep->taskp(V3Randomize::newRandomizeFunc(classp));
|
nodep->taskp(V3Randomize::newRandomizeFunc(classp));
|
||||||
memberMap.clear();
|
m_memberMap.clear();
|
||||||
} else if (nodep->name() == "srandom") {
|
} else if (nodep->name() == "srandom") {
|
||||||
nodep->taskp(V3Randomize::newSRandomFunc(classp));
|
nodep->taskp(V3Randomize::newSRandomFunc(classp));
|
||||||
memberMap.clear();
|
m_memberMap.clear();
|
||||||
} else if (nodep->name() == "get_randstate") {
|
} else if (nodep->name() == "get_randstate") {
|
||||||
methodOkArguments(nodep, 0, 0);
|
methodOkArguments(nodep, 0, 0);
|
||||||
classp->baseMostClassp()->needRNG(true);
|
classp->baseMostClassp()->needRNG(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue