Basic constructor macro for vl-fundecl structures.
(make-vl-fundecl [:name <name>] [:lifetime <lifetime>] [:rettype <rettype>] [:portdecls <portdecls>] [:imports <imports>] [:vardecls <vardecls>] [:paramdecls <paramdecls>] [:blockitems <blockitems>] [:body <body>] [:atts <atts>] [:loc <loc>])
This is the usual way to construct vl-fundecl structures. It simply conses together a structure with the specified fields.
This macro generates a new vl-fundecl structure from scratch. See also change-vl-fundecl, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-vl-fundecl (&rest args) (std::make-aggregate 'vl-fundecl args '((:name) (:lifetime) (:rettype) (:portdecls) (:imports) (:vardecls) (:paramdecls) (:blockitems) (:body) (:atts) (:loc)) 'make-vl-fundecl nil))
Function:
(defun vl-fundecl (name lifetime rettype portdecls imports vardecls paramdecls blockitems body atts loc) (declare (xargs :guard (and (stringp name) (vl-lifetime-p lifetime) (vl-datatype-p rettype) (vl-portdecllist-p portdecls) (vl-importlist-p imports) (vl-vardecllist-p vardecls) (vl-paramdecllist-p paramdecls) (vl-blockitemlist-p blockitems) (vl-stmt-p body) (vl-atts-p atts) (vl-location-p loc)))) (declare (xargs :guard t)) (let ((__function__ 'vl-fundecl)) (declare (ignorable __function__)) (b* ((name (mbe :logic (str-fix name) :exec name)) (lifetime (mbe :logic (vl-lifetime-fix lifetime) :exec lifetime)) (rettype (mbe :logic (vl-datatype-fix rettype) :exec rettype)) (portdecls (mbe :logic (vl-portdecllist-fix portdecls) :exec portdecls)) (imports (mbe :logic (vl-importlist-fix imports) :exec imports)) (vardecls (mbe :logic (vl-vardecllist-fix vardecls) :exec vardecls)) (paramdecls (mbe :logic (vl-paramdecllist-fix paramdecls) :exec paramdecls)) (blockitems (mbe :logic (vl-blockitemlist-fix blockitems) :exec blockitems)) (body (mbe :logic (vl-stmt-fix body) :exec body)) (atts (mbe :logic (vl-atts-fix atts) :exec atts)) (loc (mbe :logic (vl-location-fix loc) :exec loc))) (cons :vl-fundecl (std::prod-cons (std::prod-cons (std::prod-cons name lifetime) (std::prod-cons rettype (std::prod-cons portdecls imports))) (std::prod-cons (std::prod-cons vardecls (std::prod-cons paramdecls blockitems)) (std::prod-cons body (std::prod-cons atts loc))))))))