Internals: Standardize debug() function generation. No functional change intended.

This commit is contained in:
Wilson Snyder
2018-05-14 06:50:47 -04:00
parent 4abf5be9ce
commit cd4e6b35b3
65 changed files with 98 additions and 403 deletions
+5 -21
View File
@@ -51,12 +51,8 @@ private:
// STATE
AstCell* m_cellp; // Current cell
static int debug() {
static int level = -1;
if (VL_UNLIKELY(level < 0)) level = v3Global.opt.debugSrcLevel(__FILE__);
return level;
}
//int m_debug; int debug() { return m_debug; }
// METHODS
VL_DEBUG_FUNC; // Declare debug()
// VISITORS
virtual void visit(AstCell* nodep) {
@@ -153,11 +149,7 @@ private:
typedef std::map<string,AstVar*> VarNameMap;
VarNameMap m_modVarNameMap; // Per module, name of cloned variables
static int debug() {
static int level = -1;
if (VL_UNLIKELY(level < 0)) level = v3Global.opt.debugSrcLevel(__FILE__);
return level;
}
VL_DEBUG_FUNC; // Declare debug()
// VISITORS
virtual void visit(AstVar* nodep) {
@@ -215,11 +207,7 @@ private:
typedef std::map<string,AstVar*> VarNameMap;
static int debug() {
static int level = -1;
if (VL_UNLIKELY(level < 0)) level = v3Global.opt.debugSrcLevel(__FILE__);
return level;
}
VL_DEBUG_FUNC; // Declare debug()
// VISITORS
virtual void visit(AstVar* nodep) {
@@ -466,11 +454,7 @@ public:
class InstStatic {
private:
static int debug() {
static int level = -1;
if (VL_UNLIKELY(level < 0)) level = v3Global.opt.debugSrcLevel(__FILE__);
return level;
}
VL_DEBUG_FUNC; // Declare debug()
InstStatic() {} // Static class
static AstNode* extendOrSel(FileLine* fl, AstNode* rhsp, AstNode* cmpWidthp) {