+\f
+;;;; debuggers' little helpers
+
+;;; for debugging when transforms are behaving mysteriously,
+;;; e.g. when debugging a problem with an ASH transform
+;;; (defun foo (&optional s)
+;;; (sb-c::/report-continuation s "S outside WHEN")
+;;; (when (and (integerp s) (> s 3))
+;;; (sb-c::/report-continuation s "S inside WHEN")
+;;; (let ((bound (ash 1 (1- s))))
+;;; (sb-c::/report-continuation bound "BOUND")
+;;; (let ((x (- bound))
+;;; (y (1- bound)))
+;;; (sb-c::/report-continuation x "X")
+;;; (sb-c::/report-continuation x "Y"))
+;;; `(integer ,(- bound) ,(1- bound)))))
+;;; (The DEFTRANSFORM doesn't do anything but report at compile time,
+;;; and the function doesn't do anything at all.)
+#!+sb-show
+(progn
+ (defknown /report-continuation (t t) null)
+ (deftransform /report-continuation ((x message) (t t))
+ (format t "~%/in /REPORT-CONTINUATION~%")
+ (format t "/(CONTINUATION-TYPE X)=~S~%" (continuation-type x))
+ (when (constant-continuation-p x)
+ (format t "/(CONTINUATION-VALUE X)=~S~%" (continuation-value x)))
+ (format t "/MESSAGE=~S~%" (continuation-value message))
+ (give-up-ir1-transform "not a real transform"))
+ (defun /report-continuation (&rest rest)
+ (declare (ignore rest))))