Internals: Show clocker in debug dumps. Part of bug1009.

This commit is contained in:
Wilson Snyder 2016-05-05 22:40:19 -04:00
parent d84e6875c5
commit 04977ef721
2 changed files with 2 additions and 0 deletions

View File

@ -514,6 +514,7 @@ public:
inline AstVarAttrClocker (en _e) : m_e(_e) {} inline AstVarAttrClocker (en _e) : m_e(_e) {}
explicit inline AstVarAttrClocker (int _e) : m_e(static_cast<en>(_e)) {} explicit inline AstVarAttrClocker (int _e) : m_e(static_cast<en>(_e)) {}
operator en () const { return m_e; } operator en () const { return m_e; }
bool unknown() const { return m_e==CLOCKER_UNKNOWN; }
AstVarAttrClocker invert() const { AstVarAttrClocker invert() const {
if (m_e==CLOCKER_YES) return CLOCKER_NO; if (m_e==CLOCKER_YES) return CLOCKER_NO;
else if (m_e==CLOCKER_NO) return CLOCKER_YES; else if (m_e==CLOCKER_NO) return CLOCKER_YES;

View File

@ -977,6 +977,7 @@ void AstVar::dump(ostream& str) {
if (attrFileDescr()) str<<" [aFD]"; if (attrFileDescr()) str<<" [aFD]";
if (isFuncReturn()) str<<" [FUNCRTN]"; if (isFuncReturn()) str<<" [FUNCRTN]";
else if (isFuncLocal()) str<<" [FUNC]"; else if (isFuncLocal()) str<<" [FUNC]";
if (!attrClocker().unknown()) str<<" ["<<attrClocker().ascii()<<"] ";
str<<" "<<varType(); str<<" "<<varType();
} }
void AstSenTree::dump(ostream& str) { void AstSenTree::dump(ostream& str) {