;; 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
(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
(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