X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefbangconstant.lisp;h=9c5d0e7662afa203a798cea49b73ba889c852023;hb=a160917364f85b38dc0826a5e3dcef87e3c4c62c;hp=539b95be81f108628b57ee7c4ebf51ba0710e5fb;hpb=7f0f521aa3f6b45259c5dfd5f7f11adcd1a7cac6;p=sbcl.git diff --git a/src/code/defbangconstant.lisp b/src/code/defbangconstant.lisp index 539b95b..9c5d0e7 100644 --- a/src/code/defbangconstant.lisp +++ b/src/code/defbangconstant.lisp @@ -23,17 +23,18 @@ ;;; but my head is currently spinning (host? target? both?) so I'll go ;;; for the minimal changeset... -- CSR, 2002-05-11 (defmacro def!constant (&whole whole name value &optional doc) + (declare (ignore value doc #-sb-xc-host name)) `(progn #-sb-xc-host (defconstant ,@(cdr whole)) #+sb-xc-host ,(unless (eql (find-symbol (symbol-name name) :cl) name) - `(defconstant ,@(cdr whole))) - #+sb-xc-host + `(defconstant ,@(cdr whole))) + #+sb-xc-host ,(let ((form `(sb!xc:defconstant ,@(cdr whole)))) - (if (boundp '*delayed-def!constants*) - `(push ',form *delayed-def!constants*) - form)))) + (if (boundp '*delayed-def!constants*) + `(push ',form *delayed-def!constants*) + form)))) ;;; machinery to implement DEF!CONSTANT delays #+sb-xc-host @@ -43,12 +44,12 @@ (/show "done binding *DELAYED-DEF!CONSTANTS*") (defun force-delayed-def!constants () (if (boundp '*delayed-def!constants*) - (progn - (mapc #'eval *delayed-def!constants*) - (makunbound '*delayed-def!constants*)) - ;; This condition is probably harmless if it comes up when - ;; interactively experimenting with the system by loading a - ;; source file into it more than once. But it's worth warning - ;; about it because it definitely shouldn't come up in an - ;; ordinary build process. - (warn "*DELAYED-DEF!CONSTANTS* is already unbound.")))) + (progn + (mapc #'eval *delayed-def!constants*) + (makunbound '*delayed-def!constants*)) + ;; This condition is probably harmless if it comes up when + ;; interactively experimenting with the system by loading a + ;; source file into it more than once. But it's worth warning + ;; about it because it definitely shouldn't come up in an + ;; ordinary build process. + (warn "*DELAYED-DEF!CONSTANTS* is already unbound."))))