X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmacros.lisp;h=a86bbc97984a806aa8510c065a440e56bd288826;hb=df679ed627975948b1cee190f4d79c397588c43e;hp=9fce92e0283d93a2667a36f60fe00c99e46b4a2c;hpb=12bd68a3ff68b4e06cfb8c441383b6e898d2ed78;p=sbcl.git diff --git a/src/compiler/macros.lisp b/src/compiler/macros.lisp index 9fce92e..a86bbc9 100644 --- a/src/compiler/macros.lisp +++ b/src/compiler/macros.lisp @@ -133,7 +133,7 @@ (deftype attributes () 'fixnum) -(eval-when (:compile-toplevel :load-toplevel :execute) +(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute) ;;; Given a list of attribute names and an alist that translates them ;;; to masks, return the OR of the masks. @@ -263,7 +263,7 @@ ;;;; to parse the IR1 representation of a function call using a ;;;; standard function lambda-list. -(eval-when (:compile-toplevel :load-toplevel :execute) +(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute) ;;; Given a DEFTRANSFORM-style lambda-list, generate code that parses ;;; the arguments of a combination with respect to that lambda-list. @@ -473,7 +473,7 @@ (pushnew 'unsafely-flushable attributes)) `(%defknown ',(if (and (consp name) - (not (eq (car name) 'setf))) + (not (legal-fun-name-p name))) name (list name)) '(function ,arg-types ,result-type) @@ -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) + (with-unique-names (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 @@ -694,7 +707,7 @@ ;;; experimentation, not for ordinary use, so it should probably ;;; become conditional on SB-SHOW. -(eval-when (:compile-toplevel :load-toplevel :execute) +(eval-when (#-sb-xc :compile-toplevel :load-toplevel :execute) (defstruct (event-info (:copier nil)) ;; The name of this event.