Basic constructor macro for frame structures.
(make-frame [:function <function>] [:scopes <scopes>])
This is the usual way to construct frame structures. It simply conses together a structure with the specified fields.
This macro generates a new frame structure from scratch. See also change-frame, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-frame (&rest args) (std::make-aggregate 'frame args '((:function) (:scopes)) 'make-frame nil))
Function:
(defun frame (function scopes) (declare (xargs :guard (and (identp function) (scope-listp scopes)))) (declare (xargs :guard (consp scopes))) (let ((__function__ 'frame)) (declare (ignorable __function__)) (b* ((function (mbe :logic (ident-fix function) :exec function)) (scopes (mbe :logic (scope-list-fix scopes) :exec scopes))) (let ((scopes (mbe :logic (if (consp scopes) scopes (list nil)) :exec scopes))) (list (cons 'function function) (cons 'scopes scopes))))))