mirror of
https://github.com/verilator/verilator.git
synced 2025-01-26 08:14:06 +00:00
Internals: Remove unneeded constructor.
This commit is contained in:
parent
d07a6f81e4
commit
0765443353
@ -134,8 +134,7 @@ private:
|
|||||||
AstNode* exprp = nodep->exprp()->unlinkFrBack();
|
AstNode* exprp = nodep->exprp()->unlinkFrBack();
|
||||||
AstNode* past = new AstPast(fl, exprp, nullptr);
|
AstNode* past = new AstPast(fl, exprp, nullptr);
|
||||||
past->dtypeFrom(exprp);
|
past->dtypeFrom(exprp);
|
||||||
exprp = new AstEq(fl, past,
|
exprp = new AstEq(fl, past, exprp->cloneTree(false));
|
||||||
exprp->cloneTree(false));
|
|
||||||
exprp->dtypeSetLogicBool();
|
exprp->dtypeSetLogicBool();
|
||||||
nodep->replaceWith(exprp);
|
nodep->replaceWith(exprp);
|
||||||
nodep->sentreep(newSenTree(nodep));
|
nodep->sentreep(newSenTree(nodep));
|
||||||
|
@ -58,9 +58,10 @@ std::ostream& operator<<(std::ostream& os, AstType rhs);
|
|||||||
//######################################################################
|
//######################################################################
|
||||||
// Creators
|
// Creators
|
||||||
|
|
||||||
void AstNode::init() {
|
AstNode::AstNode(AstType t, FileLine* fl)
|
||||||
|
: m_type{t}
|
||||||
|
, m_fileline{fl} {
|
||||||
editCountInc();
|
editCountInc();
|
||||||
m_fileline = nullptr;
|
|
||||||
m_nextp = nullptr;
|
m_nextp = nullptr;
|
||||||
m_backp = nullptr;
|
m_backp = nullptr;
|
||||||
m_headtailp = this; // When made, we're a list of only a single element
|
m_headtailp = this; // When made, we're a list of only a single element
|
||||||
|
11
src/V3Ast.h
11
src/V3Ast.h
@ -1449,7 +1449,6 @@ class AstNode {
|
|||||||
if (nodep) nodep->m_backp = this;
|
if (nodep) nodep->m_backp = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init(); // initialize value of AstNode
|
|
||||||
private:
|
private:
|
||||||
AstNode* cloneTreeIter();
|
AstNode* cloneTreeIter();
|
||||||
AstNode* cloneTreeIterList();
|
AstNode* cloneTreeIterList();
|
||||||
@ -1469,15 +1468,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// CONSTRUCTORS
|
// CONSTRUCTORS
|
||||||
AstNode(AstType t)
|
AstNode(AstType t, FileLine* fl);
|
||||||
: m_type{t} {
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
AstNode(AstType t, FileLine* fl)
|
|
||||||
: m_type{t} {
|
|
||||||
init();
|
|
||||||
m_fileline = fl;
|
|
||||||
}
|
|
||||||
virtual AstNode* clone() = 0; // Generally, cloneTree is what you want instead
|
virtual AstNode* clone() = 0; // Generally, cloneTree is what you want instead
|
||||||
virtual void cloneRelink() {}
|
virtual void cloneRelink() {}
|
||||||
void cloneRelinkTree();
|
void cloneRelinkTree();
|
||||||
|
Loading…
Reference in New Issue
Block a user