X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefbangmacro.lisp;h=723a04e609f55752729212cf1a4f782a95de9b01;hb=b14a61c6af3e3005c94e633e727177346240066e;hp=7e7dba306ec6f7fdad936b615c303ae3c12324b1;hpb=cea4896b2482b7b2b429c1631d774b4cfbc0efba;p=sbcl.git diff --git a/src/code/defbangmacro.lisp b/src/code/defbangmacro.lisp index 7e7dba3..723a04e 100644 --- a/src/code/defbangmacro.lisp +++ b/src/code/defbangmacro.lisp @@ -22,8 +22,8 @@ ;; a description of the DEF!MACRO call to be stored until we get enough ;; of the system running to finish processing it (defstruct delayed-def!macro - (args (required-argument) :type cons) - (package *package* :type package)) + (args (missing-arg) :type cons) + (package (sane-package) :type package)) ;; a list of DELAYED-DEF!MACROs stored until we get DEF!MACRO working fully ;; so that we can apply it to them. After DEF!MACRO is made to work, this ;; list is processed, and then should no longer be used; it's made unbound in @@ -38,12 +38,12 @@ (defmacro def!macro (name &rest rest) #-(or sb-xc-host sb-xc) `(defmacro ,name ,@rest) #+sb-xc-host `(progn - (defmacro ,name ,@rest) - ,(let ((uncrossed-args `(,(uncross name) ,@rest))) - (if (boundp '*delayed-def!macros*) - `(push (make-delayed-def!macro :args ',uncrossed-args) - *delayed-def!macros*) - `(sb!xc:defmacro ,@uncrossed-args)))) + (defmacro ,name ,@rest) + ,(let ((uncrossed-args `(,(uncross name) ,@rest))) + (if (boundp '*delayed-def!macros*) + `(push (make-delayed-def!macro :args ',uncrossed-args) + *delayed-def!macros*) + `(sb!xc:defmacro ,@uncrossed-args)))) ;; When cross-compiling, we don't want the DEF!MACRO to have any ;; effect at compile time, because (1) we already defined the macro ;; when building the cross-compiler, so at best it would be redundant @@ -62,9 +62,9 @@ (if (boundp '*delayed-def!macros*) (progn (mapcar (lambda (x) - (let ((*package* (delayed-def!macro-package x))) - (eval `(sb!xc:defmacro ,@(delayed-def!macro-args x))))) - (reverse *delayed-def!macros*)) + (let ((*package* (delayed-def!macro-package x))) + (eval `(sb!xc:defmacro ,@(delayed-def!macro-args x))))) + (reverse *delayed-def!macros*)) ;; We shouldn't need this list any more. Making it unbound serves as a ;; signal to DEF!MACRO that it needn't delayed DEF!MACROs any more. ;; It is also generally a good thing for other reasons: it frees