X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fcompiler-error.lisp;h=41a1d3b919912941534307d51196fbd634d2929b;hb=19319c931fc1636835dbef71808cc10e252bcf45;hp=ac0a366b7a264e293c130ca6e5ecc7d98b6cc342;hpb=04a651e749befd65ffd8bf49f689b6e7d55607e2;p=sbcl.git diff --git a/src/compiler/compiler-error.lisp b/src/compiler/compiler-error.lisp index ac0a366..41a1d3b 100644 --- a/src/compiler/compiler-error.lisp +++ b/src/compiler/compiler-error.lisp @@ -99,6 +99,20 @@ (funcall *compiler-error-bailout* condition) (bug "Control returned from *COMPILER-ERROR-BAILOUT*."))) +(defmacro with-compiler-error-resignalling (&body body) + `(handler-bind + ((compiler-error + (lambda (c) + (if (boundp '*compiler-error-bailout*) + ;; if we're in the compiler, delegate either to a higher + ;; authority or, if that's us, back down to the + ;; outermost compiler handler... + (signal c) + ;; ... if we're not in the compiler, better signal the + ;; error straight away. + (invoke-restart 'signal-error))))) + ,@body)) + (defun compiler-warn (datum &rest arguments) (apply #'warn datum arguments) (values))