X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Flate-macros.lisp;h=dfd305c52ae709e8ccfb6e9dcac6af517f2614e9;hb=4cf50b1896b25f5337e7c258b0b560da00d47993;hp=8a135204f8e57357d8be6c14e3595a3a03502c55;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/compiler/late-macros.lisp b/src/compiler/late-macros.lisp index 8a13520..dfd305c 100644 --- a/src/compiler/late-macros.lisp +++ b/src/compiler/late-macros.lisp @@ -17,9 +17,6 @@ (in-package "SB!C") -(file-comment - "$Header$") - #+sb-xc-host (sb!xc:defmacro def-boolean-attribute (name &rest attribute-names) #!+sb-doc @@ -36,7 +33,7 @@ NAME-attributes attribute-name* Return a set of the named attributes." - (let ((const-name (symbolicate name "-ATTRIBUTE-TRANSLATIONS")) + (let ((translations-name (symbolicate "*" name "-ATTRIBUTE-TRANSLATIONS*")) (test-name (symbolicate name "-ATTRIBUTEP"))) (collect ((alist)) (do ((mask 1 (ash mask 1)) @@ -45,13 +42,15 @@ (alist (cons (car names) mask))) `(progn + (eval-when (:compile-toplevel :load-toplevel :execute) - (defconstant ,const-name ',(alist))) + (defparameter ,translations-name ',(alist))) (defmacro ,test-name (attributes &rest attribute-names) "Automagically generated boolean attribute test function. See Def-Boolean-Attribute." - `(logtest ,(compute-attribute-mask attribute-names ,const-name) + `(logtest ,(compute-attribute-mask attribute-names + ,translations-name) (the attributes ,attributes))) (define-setf-expander ,test-name (place &rest attributes @@ -63,14 +62,14 @@ env (compute-attribute-mask attributes - ,const-name + ,translations-name ) ',test-name)) (defmacro ,(symbolicate name "-ATTRIBUTES") (&rest attribute-names) "Automagically generated boolean attribute creation function. See Def-Boolean-Attribute." - (compute-attribute-mask attribute-names ,const-name)))))) + (compute-attribute-mask attribute-names ,translations-name)))))) ;;; a helper function for the cross-compilation target Lisp code which ;;; DEF-BOOLEAN-ATTRIBUTE expands into