mirror of
https://github.com/verilator/verilator.git
synced 2026-10-02 16:13:34 +02:00
Internals: Add CCall assertion
This commit is contained in:
+4
-1
@@ -4512,7 +4512,9 @@ class AstCCall final : public AstNodeCCall {
|
||||
// pointer (e.g.: 'this')
|
||||
public:
|
||||
AstCCall(FileLine* fl, AstCFunc* funcp, AstNodeExpr* argsp = nullptr)
|
||||
: ASTGEN_SUPER_CCall(fl, funcp, argsp) {}
|
||||
: ASTGEN_SUPER_CCall(fl, funcp, argsp) {
|
||||
UASSERT_OBJ(funcp, this, "CCall created calling null function");
|
||||
}
|
||||
ASTGEN_MEMBERS_AstCCall;
|
||||
|
||||
const VSelfPointerText& selfPointer() const { return m_selfPointer; }
|
||||
@@ -4528,6 +4530,7 @@ public:
|
||||
AstCMethodCall(FileLine* fl, AstNodeExpr* fromp, AstCFunc* funcp, AstNodeExpr* argsp = nullptr)
|
||||
: ASTGEN_SUPER_CMethodCall(fl, funcp, argsp) {
|
||||
this->fromp(fromp);
|
||||
UASSERT_OBJ(funcp, this, "CMethodCall created calling null function");
|
||||
}
|
||||
ASTGEN_MEMBERS_AstCMethodCall;
|
||||
};
|
||||
|
||||
+3
-6
@@ -33,9 +33,8 @@
|
||||
|
||||
class V3DfgContext;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//######################################################################
|
||||
// Base class for all context objects
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class V3DfgSubContext VL_NOT_FINAL {
|
||||
V3DfgContext& m_ctx; // The whole context
|
||||
@@ -59,9 +58,8 @@ public:
|
||||
const std::string& label() const { return m_label; }
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//######################################################################
|
||||
// Contexts for various algorithms - keep sorted
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class V3DfgAstToDfgContext final : public V3DfgSubContext {
|
||||
// Only V3DfgContext can create an instance
|
||||
@@ -334,9 +332,8 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//######################################################################
|
||||
// Top level V3DfgContext
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class V3DfgContext final {
|
||||
const std::string m_label; // Label to add to stats, etc.
|
||||
|
||||
+1
-1
@@ -127,7 +127,7 @@ string EmitCBaseVisitorConst::cFuncArgs(const AstCFunc* nodep) {
|
||||
for (const AstNode* stmtp = nodep->argsp(); stmtp; stmtp = stmtp->nextp()) {
|
||||
if (const AstVar* const portp = VN_CAST(stmtp, Var)) {
|
||||
if (portp->isIO() && !portp->isFuncReturn()) {
|
||||
if (args != "") args += ", ";
|
||||
if (!args.empty()) args += ", ";
|
||||
if (nodep->dpiImportPrototype() || nodep->dpiExportDispatcher()) {
|
||||
args += portp->dpiArgType(true, false);
|
||||
} else if (nodep->funcPublic()) {
|
||||
|
||||
Reference in New Issue
Block a user