X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmacros.lisp;h=f6e4fb0b5f511f48ad4ad191da2b348e4a83ba0a;hb=d61775ee52828f379eb6acedca421d5a55bfa2bd;hp=2a7fb523bb19bb706e39b6b0f394172c1c78e69d;hpb=4ff8421d6f4590024f82ea6f6851e25b4ca3df99;p=sbcl.git diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index 2a7fb52..f6e4fb0 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -687,6 +687,19 @@ (defmacro with-continuation-type-assertion ((cont ctype context) &body body) `(let ((*lexenv* (ir1ize-the-or-values ,ctype ,cont *lexenv* ,context))) ,@body)) + +(defmacro with-component-last-block ((component block) &body body) + (let ((old-last-block (gensym "OLD-LAST-BLOCK"))) + (once-only ((component component) + (block block)) + `(let ((,old-last-block (component-last-block ,component))) + (unwind-protect + (progn (setf (component-last-block ,component) + ,block) + ,@body) + (setf (component-last-block ,component) + ,old-last-block)))))) + ;;;; the EVENT statistics/trace utility