diff --git a/src/V3Ast.h b/src/V3Ast.h index 26c3d7d91..b73b1840e 100644 --- a/src/V3Ast.h +++ b/src/V3Ast.h @@ -1962,7 +1962,7 @@ private: bool m_lvalue; // Left hand side assignment AstVar* m_varp; // [AfterLink] Pointer to variable itself AstVarScope* m_varScopep; // Varscope for hierarchy - AstPackage* m_packagep; // Package hierarchy + AstNodeModule* m_packagep; // Package hierarchy string m_name; // Name of variable string m_hiername; // Scope converted into name-> for emitting bool m_hierThis; // Hiername points to "this" function @@ -1997,8 +1997,8 @@ public: void hiername(const string& hn) { m_hiername = hn; } bool hierThis() const { return m_hierThis; } void hierThis(bool flag) { m_hierThis = flag; } - AstPackage* packagep() const { return m_packagep; } - void packagep(AstPackage* nodep) { m_packagep = nodep; } + AstNodeModule* packagep() const { return m_packagep; } + void packagep(AstNodeModule* nodep) { m_packagep = nodep; } // Know no children, and hot function, so skip iterator for speed // See checkTreeIter also that asserts no children // cppcheck-suppress functionConst @@ -2362,7 +2362,7 @@ private: string m_name; // Name of variable string m_dotted; // Dotted part of scope the name()ed task/func is under or "" string m_inlinedDots; // Dotted hierarchy flattened out - AstPackage* m_packagep; // Package hierarchy + AstNodeModule* m_packagep; // Package hierarchy public: AstNodeFTaskRef(AstType t, FileLine* fl, bool statement, AstNode* namep, AstNode* pinsp) : AstNodeStmt(t, fl, statement) @@ -2390,8 +2390,8 @@ public: void taskp(AstNodeFTask* taskp) { m_taskp = taskp; } virtual void name(const string& name) { m_name = name; } void dotted(const string& name) { m_dotted = name; } - AstPackage* packagep() const { return m_packagep; } - void packagep(AstPackage* nodep) { m_packagep = nodep; } + AstNodeModule* packagep() const { return m_packagep; } + void packagep(AstNodeModule* nodep) { m_packagep = nodep; } // op1 = namep AstNode* namep() const { return op1p(); } // op2 = reserved for AstMethodCall diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index dc4b9d8b8..63437c0c5 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -826,7 +826,7 @@ class AstClassRefDType : public AstNodeDType { // Reference to a class private: AstClass* m_classp; // data type pointed to, BELOW the AstTypedef - AstPackage* m_packagep; // Package hierarchy + AstNodeModule* m_packagep; // Package hierarchy public: AstClassRefDType(FileLine* fl, AstClass* classp) : ASTGEN_SUPER(fl), m_classp(classp), m_packagep(NULL) { @@ -858,8 +858,8 @@ public: virtual AstNodeDType* virtRefDTypep() const { return NULL; } virtual void virtRefDTypep(AstNodeDType* nodep) {} virtual AstNodeDType* subDTypep() const { return NULL; } - AstPackage* packagep() const { return m_packagep; } - void packagep(AstPackage* nodep) { m_packagep = nodep; } + AstNodeModule* packagep() const { return m_packagep; } + void packagep(AstNodeModule* nodep) { m_packagep = nodep; } AstClass* classp() const { return m_classp; } void classp(AstClass* nodep) { m_classp = nodep; } }; @@ -972,7 +972,7 @@ class AstRefDType : public AstNodeDType { private: AstNodeDType* m_refDTypep; // data type pointed to, BELOW the AstTypedef string m_name; // Name of an AstTypedef - AstPackage* m_packagep; // Package hierarchy + AstNodeModule* m_packagep; // Package hierarchy public: AstRefDType(FileLine* fl, const string& name) : ASTGEN_SUPER(fl), m_refDTypep(NULL), m_name(name), m_packagep(NULL) {} @@ -1028,8 +1028,8 @@ public: virtual AstNodeDType* virtRefDTypep() const { return refDTypep(); } virtual void virtRefDTypep(AstNodeDType* nodep) { refDTypep(nodep); } virtual AstNodeDType* subDTypep() const { return m_refDTypep; } - AstPackage* packagep() const { return m_packagep; } - void packagep(AstPackage* nodep) { m_packagep = nodep; } + AstNodeModule* packagep() const { return m_packagep; } + void packagep(AstNodeModule* nodep) { m_packagep = nodep; } AstNode* typeofp() const { return op2p(); } }; @@ -1156,10 +1156,10 @@ public: class AstEnumItemRef : public AstNodeMath { private: - AstEnumItem* m_itemp; // [AfterLink] Pointer to item - AstPackage* m_packagep; // Package hierarchy + AstEnumItem* m_itemp; // [AfterLink] Pointer to item + AstNodeModule* m_packagep; // Package hierarchy public: - AstEnumItemRef(FileLine* fl, AstEnumItem* itemp, AstPackage* packagep) + AstEnumItemRef(FileLine* fl, AstEnumItem* itemp, AstNodeModule* packagep) : ASTGEN_SUPER(fl), m_itemp(itemp), m_packagep(packagep) { dtypeFrom(m_itemp); } @@ -1176,8 +1176,8 @@ public: virtual string emitVerilog() { V3ERROR_NA_RETURN(""); } virtual string emitC() { V3ERROR_NA_RETURN(""); } virtual bool cleanOut() const { return true; } - AstPackage* packagep() const { return m_packagep; } - void packagep(AstPackage* nodep) { m_packagep = nodep; } + AstNodeModule* packagep() const { return m_packagep; } + void packagep(AstNodeModule* nodep) { m_packagep = nodep; } }; class AstEnumDType : public AstNodeDType { diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 3044eca87..3737d094b 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -350,8 +350,8 @@ public: } return symp; } - VSymEnt* insertBlock(VSymEnt* abovep, const string& name, - AstNode* nodep, AstPackage* packagep) { + VSymEnt* insertBlock(VSymEnt* abovep, const string& name, AstNode* nodep, + AstNodeModule* packagep) { // A fake point in the hierarchy, corresponding to a begin or function/task block // After we remove begins these will go away // Note we fallback to the symbol table of the parent, as we want to find variables there @@ -371,8 +371,8 @@ public: abovep->reinsert(name, symp); return symp; } - VSymEnt* insertSym(VSymEnt* abovep, const string& name, - AstNode* nodep, AstPackage* packagep) { + VSymEnt* insertSym(VSymEnt* abovep, const string& name, AstNode* nodep, + AstNodeModule* packagep) { UASSERT_OBJ(abovep, nodep, "Null symbol table inserting node"); VSymEnt* symp = new VSymEnt(&m_syms, nodep); UINFO(9," INSERTsym se"<