Basic constructor macro for vl-gencase structures.
(make-vl-gencase [:test <test>] [:cases <cases>] [:default <default>] [:loc <loc>])
This is the usual way to construct vl-gencase structures. It simply conses together a structure with the specified fields.
This macro generates a new vl-gencase structure from scratch. See also change-vl-gencase, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-vl-gencase (&rest args) (std::make-aggregate 'vl-gencase args '((:test) (:cases) (:default) (:loc)) 'make-vl-gencase nil))
Function:
(defun vl-gencase (test cases default loc) (declare (xargs :guard (and (vl-expr-p test) (vl-gencaselist-p cases) (vl-genelement-p default) (vl-location-p loc)))) (declare (xargs :guard t)) (let ((__function__ 'vl-gencase)) (declare (ignorable __function__)) (b* ((test (mbe :logic (vl-expr-fix test) :exec test)) (cases (mbe :logic (vl-gencaselist-fix cases) :exec cases)) (default (mbe :logic (vl-genelement-fix default) :exec default)) (loc (mbe :logic (vl-location-fix loc) :exec loc))) (cons :vl-gencase (std::prod-cons (std::prod-cons test cases) (std::prod-cons default loc))))))