1 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; This software is derived from the CMU CL system, which was
5 ;;;; written at Carnegie Mellon University and released into the
6 ;;;; public domain. The software is in the public domain and is
7 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
8 ;;;; files for more information.
10 (in-package "SB!KERNEL")
12 #!+stack-allocatable-fixed-objects
13 (declaim (inline make-restart
)) ;; to allow DX-allocation
15 ;;;; This defstruct should appear before any use of WITH-CONDITION-RESTARTS
16 ;;;; so that the slot accessors are transformed.
17 (defstruct (restart (:constructor make-restart
18 ;; Having TEST-FUNCTION at the end allows
19 ;; to not replicate its default value in RESTART-BIND.
21 &optional report-function
24 (:copier nil
) (:predicate nil
))
25 (name (missing-arg) :type symbol
:read-only t
)
26 (function (missing-arg) :type function
:read-only t
)
27 (report-function nil
:type
(or null function
) :read-only t
)
28 (interactive-function nil
:type
(or null function
) :read-only t
)
29 (test-function (lambda (cond) (declare (ignore cond
)) t
) :type function
:read-only t
)
30 ;; the list of conditions which are currently associated to the
31 ;; restart. maintained by WITH-CONDITION-RESTARTS in a neither
32 ;; thread- nor interrupt-safe way. This should not be a problem
33 ;; however, since safe uses of restarts have to assume dynamic
35 (associated-conditions '() :type list
))
37 #!-sb-fluid
(declaim (freeze-type restart
))