mirror of
https://github.com/verilator/verilator.git
synced 2026-10-07 10:33:13 +02:00
astgen: generate type specific addNext, remove astNextNull
Generate type specific static overloads of Ast<Node>::addNext, which return the correct sub-type of the 'this' they were invoked on. Also remove AstNode::addNextNull, which is now only used in the parser, implement in verilog.y directly as a template function.
This commit is contained in:
+3
-3
@@ -496,7 +496,7 @@ private:
|
||||
// Put assignment in FRONT of all other statements
|
||||
if (AstNode* const afterp = beginp->nextp()) {
|
||||
afterp->unlinkFrBackWithNext();
|
||||
assp->addNext(afterp);
|
||||
AstNode::addNext<AstNode, AstNode>(assp, afterp);
|
||||
}
|
||||
beginp->addNext(assp);
|
||||
}
|
||||
@@ -819,7 +819,7 @@ private:
|
||||
AstVarRef* const refp
|
||||
= new AstVarRef(portp->fileline(), outvscp,
|
||||
portp->isWritable() ? VAccess::WRITE : VAccess::READ);
|
||||
argnodesp = argnodesp->addNextNull(refp);
|
||||
argnodesp = argnodesp->addNext(refp);
|
||||
|
||||
if (portp->isNonOutput()) {
|
||||
std::string frName
|
||||
@@ -847,7 +847,7 @@ private:
|
||||
outvscp->varp()->protect(false);
|
||||
AstVarRef* const refp = new AstVarRef(
|
||||
portp->fileline(), outvscp, portp->isWritable() ? VAccess::WRITE : VAccess::READ);
|
||||
argnodesp = argnodesp->addNextNull(refp);
|
||||
argnodesp = argnodesp->addNext(refp);
|
||||
}
|
||||
|
||||
{ // Call the user function
|
||||
|
||||
Reference in New Issue
Block a user