Internals: V3Number tracks node information, part of bug1305.

Signed-off-by: Wilson Snyder <[email protected]>
This commit is contained in:
Todd Strader
2019-05-09 20:03:19 -04:00
committed by Wilson Snyder
parent 00efa05b50
commit eac3458647
27 changed files with 469 additions and 382 deletions
+3 -3
View File
@@ -120,9 +120,9 @@ private:
return lhsp;
} else if (VN_IS(lhsp, Const)) {
// Optional vs just making add/sub below, but saves constification some work
V3Number num (lhsp->fileline(), lhsp->width());
num.opSub(VN_CAST(lhsp, Const)->num(), V3Number(lhsp->fileline(), 32, rhs));
num.isSigned(lhsp->isSigned());
V3Number num (lhsp, lhsp->width());
num.opSub(VN_CAST(lhsp, Const)->num(), V3Number(lhsp, 32, rhs));
num.isSigned(lhsp->isSigned());
AstNode* newp = new AstConst(lhsp->fileline(), num);
return newp;
} else if (rhs > 0) {