mirror of
https://github.com/verilator/verilator.git
synced 2025-01-19 12:54:02 +00:00
Internals: Remove some uses of AstConst taking V3Number. No functional change intended.
This commit is contained in:
parent
55a25674a2
commit
c6650f88e1
@ -511,7 +511,7 @@ private:
|
||||
}
|
||||
} else {
|
||||
AstNode* clrp = new AstAssign(fl, new AstVarRef(fl, m_activityVscp, true),
|
||||
new AstConst(fl, V3Number(fl, m_activityVscp->width())));
|
||||
new AstConst(fl, V3Number(fl, m_activityVscp->width(), 0)));
|
||||
m_fullFuncp->addFinalsp(clrp->cloneTree(true));
|
||||
m_chgFuncp->addFinalsp(clrp);
|
||||
}
|
||||
|
@ -3987,14 +3987,8 @@ void V3ParseGrammar::argWrapList(AstNodeFTaskRef* nodep) {
|
||||
}
|
||||
|
||||
AstNode* V3ParseGrammar::createSupplyExpr(FileLine* fileline, string name, int value) {
|
||||
FileLine* newfl = new FileLine(fileline);
|
||||
newfl->warnOff(V3ErrorCode::WIDTH, true);
|
||||
AstNode* nodep = new AstConst(newfl, V3Number(newfl));
|
||||
// Adding a NOT is less work than figuring out how wide to make it
|
||||
if (value) nodep = new AstNot(newfl, nodep);
|
||||
nodep = new AstAssignW(newfl, new AstVarRef(fileline, name, true),
|
||||
nodep);
|
||||
return nodep;
|
||||
return new AstAssignW(fileline, new AstVarRef(fileline, name, true),
|
||||
new AstConst(fileline, V3Number(fileline, (value ? "'1" : "'0"))));
|
||||
}
|
||||
|
||||
AstRange* V3ParseGrammar::scrubRange(AstNodeRange* nrangep) {
|
||||
|
Loading…
Reference in New Issue
Block a user