Internals: Remove some uses of AstConst taking V3Number. No functional change intended.

This commit is contained in:
Wilson Snyder 2019-05-03 21:21:18 -04:00
parent 55a25674a2
commit c6650f88e1
2 changed files with 3 additions and 9 deletions

View File

@ -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);
}

View File

@ -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) {