Basic constructor macro for finalizer structures.
(make-finalizer [:name <name>] [:inputs <inputs>] [:output <output>] [:body <body>])
This is the usual way to construct finalizer structures. It simply conses together a structure with the specified fields.
This macro generates a new finalizer structure from scratch. See also change-finalizer, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-finalizer (&rest args) (std::make-aggregate 'finalizer args '((:name) (:inputs) (:output) (:body)) 'make-finalizer nil))
Function:
(defun finalizer (name inputs output body) (declare (xargs :guard (and (identifierp name) (funparam-listp inputs) (type-optionp output) (statement-listp body)))) (declare (xargs :guard t)) (let ((__function__ 'finalizer)) (declare (ignorable __function__)) (b* ((name (mbe :logic (identifier-fix name) :exec name)) (inputs (mbe :logic (funparam-list-fix inputs) :exec inputs)) (output (mbe :logic (type-option-fix output) :exec output)) (body (mbe :logic (statement-list-fix body) :exec body))) (cons :finalizer (list (cons 'name name) (cons 'inputs inputs) (cons 'output output) (cons 'body body))))))