Internal coverage improvements
This commit is contained in:
parent
ab4ad9965c
commit
a1322635fd
|
|
@ -111,7 +111,7 @@ public:
|
||||||
m_symCurrentp = symp;
|
m_symCurrentp = symp;
|
||||||
}
|
}
|
||||||
void popScope(AstNode* nodep) {
|
void popScope(AstNode* nodep) {
|
||||||
if (symCurrentp()->nodep() != nodep) {
|
if (VL_UNCOVERABLE(symCurrentp()->nodep() != nodep)) { // LCOV_EXCL_START
|
||||||
if (debug()) {
|
if (debug()) {
|
||||||
showUpward();
|
showUpward();
|
||||||
dump(cout, "-mism: ");
|
dump(cout, "-mism: ");
|
||||||
|
|
@ -120,19 +120,19 @@ public:
|
||||||
<< " but parser thinks ending "
|
<< " but parser thinks ending "
|
||||||
<< nodep->prettyTypeName());
|
<< nodep->prettyTypeName());
|
||||||
return;
|
return;
|
||||||
}
|
} // LCOV_EXCL_STOP
|
||||||
m_sympStack.pop_back();
|
m_sympStack.pop_back();
|
||||||
UASSERT_OBJ(!m_sympStack.empty(), nodep, "symbol stack underflow");
|
UASSERT_OBJ(!m_sympStack.empty(), nodep, "symbol stack underflow");
|
||||||
m_symCurrentp = m_sympStack.back();
|
m_symCurrentp = m_sympStack.back();
|
||||||
}
|
}
|
||||||
void showUpward() {
|
void showUpward() { // LCOV_EXCL_START
|
||||||
UINFO(1, "ParseSym Stack:\n");
|
UINFO(1, "ParseSym Stack:\n");
|
||||||
for (auto it = m_sympStack.rbegin(); it != m_sympStack.rend(); ++it) {
|
for (auto it = m_sympStack.rbegin(); it != m_sympStack.rend(); ++it) {
|
||||||
VSymEnt* symp = *it;
|
VSymEnt* symp = *it;
|
||||||
UINFO(1, " " << symp->nodep() << endl);
|
UINFO(1, " " << symp->nodep() << endl);
|
||||||
}
|
}
|
||||||
UINFO(1, "ParseSym Current: " << symCurrentp()->nodep() << endl);
|
UINFO(1, "ParseSym Current: " << symCurrentp()->nodep() << endl);
|
||||||
}
|
} // LCOV_EXCL_STOP
|
||||||
void dump(std::ostream& os, const string& indent = "") { m_syms.dump(os, indent); }
|
void dump(std::ostream& os, const string& indent = "") { m_syms.dump(os, indent); }
|
||||||
AstNode* findEntUpward(const string& name) const {
|
AstNode* findEntUpward(const string& name) const {
|
||||||
// Lookup the given string as an identifier, return type of the id, scanning upward
|
// Lookup the given string as an identifier, return type of the id, scanning upward
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue