diff --git a/src/V3AstNodeOther.h b/src/V3AstNodeOther.h index 123ab7a4b..dfd4290f8 100644 --- a/src/V3AstNodeOther.h +++ b/src/V3AstNodeOther.h @@ -3928,7 +3928,7 @@ public: ASTGEN_MEMBERS_Assign; AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override { AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr; - return new AstAssign(this->fileline(), lhsp, rhsp, controlp); + return new AstAssign{fileline(), lhsp, rhsp, controlp}; } bool brokeLhsMustBeLvalue() const override { return true; } }; @@ -3949,7 +3949,7 @@ public: ASTGEN_MEMBERS_AssignDly; AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override { AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr; - return new AstAssignDly(this->fileline(), lhsp, rhsp, controlp); + return new AstAssignDly{fileline(), lhsp, rhsp, controlp}; } bool isGateOptimizable() const override { return false; } string verilogKwd() const override { return "<="; } @@ -4011,7 +4011,7 @@ public: void strengthSpecp(AstStrengthSpec* const strengthSpecp) { setOp4p((AstNode*)strengthSpecp); } AstNode* cloneType(AstNode* lhsp, AstNode* rhsp) override { AstNode* const controlp = timingControlp() ? timingControlp()->cloneTree(false) : nullptr; - return new AstAssignW(this->fileline(), lhsp, rhsp, controlp); + return new AstAssignW{fileline(), lhsp, rhsp, controlp}; } bool brokeLhsMustBeLvalue() const override { return true; } AstAlways* convertToAlways(); diff --git a/src/V3Const.cpp b/src/V3Const.cpp index bed6ca32a..e5dcb93a4 100644 --- a/src/V3Const.cpp +++ b/src/V3Const.cpp @@ -2693,9 +2693,9 @@ private: // TODO: This really is dodgy, as strictgly compliant simulators will not // execute this block, but but t_func_check relies on it nodep->replaceWith( - new AstSenItem(nodep->fileline(), AstSenItem::Initial())); + new AstSenItem{nodep->fileline(), AstSenItem::Initial{}}); } else { - nodep->replaceWith(new AstSenItem(nodep->fileline(), AstSenItem::Never())); + nodep->replaceWith(new AstSenItem{nodep->fileline(), AstSenItem::Never{}}); } VL_DO_DANGLING(nodep->deleteTree(), nodep); } else { diff --git a/src/V3Delayed.cpp b/src/V3Delayed.cpp index 878de72f6..4e75e0788 100644 --- a/src/V3Delayed.cpp +++ b/src/V3Delayed.cpp @@ -556,14 +556,14 @@ private: if (!dlyvscp) { // First use of this delayed variable const string newvarname = (string("__Vdly__") + nodep->varp()->shortName()); dlyvscp = createVarSc(oldvscp, newvarname, 0, nullptr); - AstNodeAssign* const prep = new AstAssignPre( + AstNodeAssign* const prep = new AstAssignPre{ nodep->fileline(), - new AstVarRef(nodep->fileline(), dlyvscp, VAccess::WRITE), - new AstVarRef(nodep->fileline(), oldvscp, VAccess::READ)); - AstNodeAssign* const postp = new AstAssignPost( + new AstVarRef{nodep->fileline(), dlyvscp, VAccess::WRITE}, + new AstVarRef{nodep->fileline(), oldvscp, VAccess::READ}}; + AstNodeAssign* const postp = new AstAssignPost{ nodep->fileline(), - new AstVarRef(nodep->fileline(), oldvscp, VAccess::WRITE), - new AstVarRef(nodep->fileline(), dlyvscp, VAccess::READ)); + new AstVarRef{nodep->fileline(), oldvscp, VAccess::WRITE}, + new AstVarRef{nodep->fileline(), dlyvscp, VAccess::READ}}; postp->lhsp()->user2(true); // Don't detect this assignment oldvscp->user1p(dlyvscp); // So we can find it later // Make new ACTIVE with identical sensitivity tree diff --git a/src/V3Order.cpp b/src/V3Order.cpp index f8aeb96d6..fd2a4a25e 100644 --- a/src/V3Order.cpp +++ b/src/V3Order.cpp @@ -778,7 +778,7 @@ public: : m_pomGraphp{pomGraphp} {} MTaskMoveVertex* makeVertexp(OrderLogicVertex* lvertexp, const OrderEitherVertex* varVertexp, const AstSenTree* domainp) override { - return new MTaskMoveVertex(m_pomGraphp, lvertexp, varVertexp, domainp); + return new MTaskMoveVertex{m_pomGraphp, lvertexp, varVertexp, domainp}; } private: @@ -1264,9 +1264,9 @@ AstActive* OrderProcess::processMoveOneLogic(const OrderLogicVertex* lvertexp, newStmtsr = 0; scopep->addActivep(newFuncpr); // Create top call to it - AstCCall* const callp = new AstCCall(nodep->fileline(), newFuncpr); + AstCCall* const callp = new AstCCall{nodep->fileline(), newFuncpr}; // Where will we be adding the call? - AstActive* const newActivep = new AstActive(nodep->fileline(), name, domainp); + AstActive* const newActivep = new AstActive{nodep->fileline(), name, domainp}; newActivep->addStmtsp(callp); if (!activep) { activep = newActivep; diff --git a/src/V3Partition.cpp b/src/V3Partition.cpp index e18af2528..baefa2ea3 100644 --- a/src/V3Partition.cpp +++ b/src/V3Partition.cpp @@ -3150,15 +3150,15 @@ static const std::vector createThreadFunctions(const ThreadSchedule& } // Unblock the fake "final" mtask when this thread is finished - funcp->addStmtsp(new AstCStmt(fl, "vlSelf->__Vm_mtaskstate_final__" + tag - + ".signalUpstreamDone(even_cycle);\n")); + funcp->addStmtsp(new AstCStmt{fl, "vlSelf->__Vm_mtaskstate_final__" + tag + + ".signalUpstreamDone(even_cycle);\n"}); } // Create the fake "final" mtask state variable AstBasicDType* const mtaskStateDtypep = v3Global.rootp()->typeTablep()->findBasicDType(fl, VBasicDTypeKwd::MTASKSTATE); AstVar* const varp - = new AstVar(fl, VVarType::MODULETEMP, "__Vm_mtaskstate_final__" + tag, mtaskStateDtypep); + = new AstVar{fl, VVarType::MODULETEMP, "__Vm_mtaskstate_final__" + tag, mtaskStateDtypep}; varp->valuep(new AstConst(fl, funcps.size())); varp->protect(false); // Do not protect as we still have references in AstText modp->addStmtp(varp); diff --git a/src/V3Sched.cpp b/src/V3Sched.cpp index 1f1ca4c20..48acaa9cc 100644 --- a/src/V3Sched.cpp +++ b/src/V3Sched.cpp @@ -364,8 +364,9 @@ const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBui const uint32_t nTriggers = senTreeps.size() + extraTriggers.size(); // Create the TRIGGERVEC variable - AstBasicDType* const tDtypep = new AstBasicDType(flp, VBasicDTypeKwd::TRIGGERVEC, - VSigning::UNSIGNED, nTriggers, nTriggers); + AstBasicDType* const tDtypep + = new AstBasicDType{flp, VBasicDTypeKwd::TRIGGERVEC, VSigning::UNSIGNED, + static_cast(nTriggers), static_cast(nTriggers)}; netlistp->typeTablep()->addTypesp(tDtypep); AstVarScope* const vscp = scopeTopp->createTemp("__V" + name + "Triggered", tDtypep); @@ -489,7 +490,7 @@ const TriggerKit createTriggers(AstNetlist* netlistp, SenExprBuilder& senExprBui const auto add = [&](const string& text) { blockp->addText(flp, text, true); }; add("#ifdef VL_DEBUG\n"); add("if (VL_UNLIKELY(vlSymsp->_vm_contextp__->debug())) {\n"); - blockp->addNodep(new AstCCall(flp, dumpp)); + blockp->addNodep(new AstCCall{flp, dumpp}); add("}\n"); add("#endif\n"); } diff --git a/src/V3SenExprBuilder.h b/src/V3SenExprBuilder.h index bf18d9053..59592a29f 100644 --- a/src/V3SenExprBuilder.h +++ b/src/V3SenExprBuilder.h @@ -160,7 +160,7 @@ class SenExprBuilder final { resultp->dtypeSetBit(); return {resultp, true}; } - return {new AstNeq(flp, currp(), prevp()), true}; + return {new AstNeq{flp, currp(), prevp()}, true}; case VEdgeType::ET_BOTHEDGE: // return {lsb(new AstXor{flp, currp(), prevp()}), false}; case VEdgeType::ET_POSEDGE: //