(%unwind-protect (%escape-fun ,exit-tag)
(%cleanup-fun ,cleanup-fun))
(return-from ,drop-thru-tag ,protected)))
+ (declare (optimize (insert-debug-catch 0)))
(,cleanup-fun)
(%continue-unwind ,next ,start ,count)))))))
\f
(binding* (((*lexenv* result-type post-binding-lexenv)
(process-decls decls (append aux-vars vars) nil
:binding-form-p t))
- (forms (if (and maybe-add-debug-catch
- *allow-instrumenting*
- (policy *lexenv* (>= insert-debug-catch 2)))
+ (debug-catch-p (and maybe-add-debug-catch
+ *allow-instrumenting*
+ (policy *lexenv*
+ (>= insert-debug-catch 2))))
+ (forms (if debug-catch-p
(wrap-forms-in-debug-catch forms)
forms))
(forms (if (eq result-type *wild-type*)
(,bind ,vars ,vals))
nil
,@body)
+ ;; Technically ANSI CL doesn't allow declarations at the
+ ;; start of the cleanup form. SBCL happens to allow for
+ ;; them, due to the way the UNWIND-PROTECT ir1 translation
+ ;; is implemented; the cleanup forms are directly spliced
+ ;; into an FLET definition body. And a declaration here
+ ;; actually has exactly the right scope for what we need
+ ;; (ensure that debug instrumentation is not emitted for the
+ ;; cleanup function). -- JES, 2007-06-16
+ (declare (optimize (insert-debug-catch 0)))
(%primitive unbind-to-here ,n-save-bs))))))
\f
;;;; non-local exit
(locally
(declare)
2))
+
+;;; Bug in the interaction of BIND-SENTINEL and UNBIND-TO-HERE, as
+;;; used by PROGV.
+
+(defvar *foo-1* nil)
+(defvar *foo-2* nil)
+
+(defun foo ()
+ (declare (optimize (debug 2)))
+ (let ((*foo-1* nil))
+ (progv
+ (list '*foo-2*)
+ (list nil)
+ (write-line "foo-2"))
+ (write-line "foo-1"))
+ (write-line "foo-0"))
+
+(foo)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.6.47"
+"1.0.6.48"