Internals: More UASSERT_OBJ conversions. No functional change intended.

This commit is contained in:
Wilson Snyder 2019-07-07 09:01:36 -04:00
parent 4ce77d3e68
commit 9af84c71f5
2 changed files with 8 additions and 8 deletions

View File

@ -215,8 +215,8 @@ string AstVar::verilogKwd() const {
} }
string AstVar::vlArgType(bool named, bool forReturn, bool forFunc) const { string AstVar::vlArgType(bool named, bool forReturn, bool forFunc) const {
if (forReturn) named = false; UASSERT_OBJ(!forReturn, this,
if (forReturn) v3fatalSrc("verilator internal data is never passed as return, but as first argument"); "Internal data is never passed as return, but as first argument");
string otype; string otype;
AstBasicDType* bdtypep = basicp(); AstBasicDType* bdtypep = basicp();
bool strtype = bdtypep && bdtypep->keyword()==AstBasicDTypeKwd::STRING; bool strtype = bdtypep && bdtypep->keyword()==AstBasicDTypeKwd::STRING;

View File

@ -951,8 +951,8 @@ class AstSelBit : public AstNodePreSel {
public: public:
AstSelBit(FileLine* fl, AstNode* fromp, AstNode* bitp) AstSelBit(FileLine* fl, AstNode* fromp, AstNode* bitp)
:AstNodePreSel(fl, fromp, bitp, NULL) { :AstNodePreSel(fl, fromp, bitp, NULL) {
if (v3Global.assertDTypesResolved()) { v3fatalSrc("not coded to create after dtypes resolved"); } UASSERT_OBJ(!v3Global.assertDTypesResolved(), this,
} "not coded to create after dtypes resolved"); }
ASTNODE_NODE_FUNCS(SelBit) ASTNODE_NODE_FUNCS(SelBit)
AstNode* bitp() const { return rhsp(); } AstNode* bitp() const { return rhsp(); }
}; };
@ -3860,8 +3860,8 @@ class AstSigned : public AstNodeUniop {
// $signed(lhs) // $signed(lhs)
public: public:
AstSigned(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) { AstSigned(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) {
if (v3Global.assertDTypesResolved()) { v3fatalSrc("not coded to create after dtypes resolved"); } UASSERT_OBJ(!v3Global.assertDTypesResolved(), this,
} "not coded to create after dtypes resolved"); }
ASTNODE_NODE_FUNCS(Signed) ASTNODE_NODE_FUNCS(Signed)
virtual void numberOperate(V3Number& out, const V3Number& lhs) { out.opAssign(lhs); out.isSigned(false); } virtual void numberOperate(V3Number& out, const V3Number& lhs) { out.opAssign(lhs); out.isSigned(false); }
virtual string emitVerilog() { return "%f$signed(%l)"; } virtual string emitVerilog() { return "%f$signed(%l)"; }
@ -3875,8 +3875,8 @@ class AstUnsigned : public AstNodeUniop {
// $unsigned(lhs) // $unsigned(lhs)
public: public:
AstUnsigned(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) { AstUnsigned(FileLine* fl, AstNode* lhsp) : AstNodeUniop(fl, lhsp) {
if (v3Global.assertDTypesResolved()) { v3fatalSrc("not coded to create after dtypes resolved"); } UASSERT_OBJ(!v3Global.assertDTypesResolved(), this,
} "not coded to create after dtypes resolved"); }
ASTNODE_NODE_FUNCS(Unsigned) ASTNODE_NODE_FUNCS(Unsigned)
virtual void numberOperate(V3Number& out, const V3Number& lhs) { out.opAssign(lhs); out.isSigned(false); } virtual void numberOperate(V3Number& out, const V3Number& lhs) { out.opAssign(lhs); out.isSigned(false); }
virtual string emitVerilog() { return "%f$unsigned(%l)"; } virtual string emitVerilog() { return "%f$unsigned(%l)"; }