forked from github/verilator
Internals: Fix 0x tree debug suffix. Misc merges from struct. No functional change.
This commit is contained in:
parent
d2ede75c71
commit
09ebc0c163
@ -755,7 +755,7 @@ void AstVarScope::dump(ostream& str) {
|
||||
}
|
||||
void AstVarXRef::dump(ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg=0x"<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (lvalue()) str<<" [LV] => ";
|
||||
else str<<" [RV] <- ";
|
||||
str<<dotted()<<". - ";
|
||||
@ -766,7 +766,7 @@ void AstVarXRef::dump(ostream& str) {
|
||||
}
|
||||
void AstVarRef::dump(ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg=0x"<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
if (lvalue()) str<<" [LV] => ";
|
||||
else str<<" [RV] <- ";
|
||||
if (varScopep()) { varScopep()->dump(str); }
|
||||
@ -815,7 +815,7 @@ void AstActive::dump(ostream& str) {
|
||||
}
|
||||
void AstNodeFTaskRef::dump(ostream& str) {
|
||||
this->AstNode::dump(str);
|
||||
if (packagep()) { str<<" pkg=0x"<<(void*)packagep(); }
|
||||
if (packagep()) { str<<" pkg="<<(void*)packagep(); }
|
||||
str<<" -> ";
|
||||
if (dotted()!="") { str<<dotted()<<". - "; }
|
||||
if (taskp()) { taskp()->dump(str); }
|
||||
|
@ -374,7 +374,7 @@ public:
|
||||
}
|
||||
|
||||
VSymEnt* findSymPrefixed(VSymEnt* lookupSymp, const string& dotname, string& baddot) {
|
||||
// Find symbol in given point in hierarchy
|
||||
// Find symbol in given point in hierarchy, allowing prefix (post-Inline)
|
||||
// For simplicity lookupSymp may be passed NULL result from findDotted
|
||||
if (!lookupSymp) return NULL;
|
||||
UINFO(8,"\t\tfindSymPrefixed "<<dotname
|
||||
@ -1040,6 +1040,10 @@ private:
|
||||
m_statep->insertSym(moduleSymp, newp->name(), newp, NULL/*packagep*/);
|
||||
}
|
||||
}
|
||||
void taskFuncSwapCheck(AstNodeFTaskRef* nodep) {
|
||||
if (nodep->taskp() && nodep->taskp()->castTask()
|
||||
&& nodep->castFuncRef()) nodep->v3error("Illegal call of a task as a function: "<<nodep->prettyName());
|
||||
}
|
||||
|
||||
// VISITs
|
||||
virtual void visit(AstNetlist* nodep, AstNUser* vup) {
|
||||
@ -1251,7 +1255,7 @@ private:
|
||||
okSymp->cellErrorScopes(nodep);
|
||||
}
|
||||
}
|
||||
if (taskp->castTask() && nodep->castFuncRef()) nodep->v3error("Illegal call of a task as a function: "<<nodep->prettyName());
|
||||
taskFuncSwapCheck(nodep);
|
||||
}
|
||||
nodep->iterateChildren(*this);
|
||||
}
|
||||
|
@ -152,7 +152,8 @@ public:
|
||||
}
|
||||
return any;
|
||||
}
|
||||
void cellErrorScopes(AstNode* lookp) {
|
||||
void cellErrorScopes(AstNode* lookp, string prettyName="") {
|
||||
if (prettyName=="") prettyName = lookp->prettyName();
|
||||
string scopes;
|
||||
for (IdNameMap::iterator it = m_idNameMap.begin(); it!=m_idNameMap.end(); ++it) {
|
||||
AstNode* nodep = it->second->nodep();
|
||||
@ -163,7 +164,7 @@ public:
|
||||
}
|
||||
}
|
||||
if (scopes=="") scopes="<no cells found>";
|
||||
cerr<<V3Error::msgPrefix()<<" Known scopes under '"<<lookp->prettyName()<<"': "
|
||||
cerr<<V3Error::msgPrefix()<<" Known scopes under '"<<prettyName<<"': "
|
||||
<<scopes<<endl;
|
||||
if (debug()) dump(cerr,"\t\t KnownScope: ", 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user