X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefbangconstant.lisp;h=9c5d0e7662afa203a798cea49b73ba889c852023;hb=9c3a9502bc872f024c365412d991ef43fd866e4c;hp=e248a203cdd2d2a269e7a8f10015301e75972987;hpb=8731c1a7c1a585d190151fa881050fb5e14c0616;p=sbcl.git diff --git a/src/code/defbangconstant.lisp b/src/code/defbangconstant.lisp index e248a20..9c5d0e7 100644 --- a/src/code/defbangconstant.lisp +++ b/src/code/defbangconstant.lisp @@ -22,18 +22,19 @@ ;;; confident in my understanding, I might try to do drastic surgery, ;;; but my head is currently spinning (host? target? both?) so I'll go ;;; for the minimal changeset... -- CSR, 2002-05-11 -(defmacro def!constant (&rest rest name value &optional doc) +(defmacro def!constant (&whole whole name value &optional doc) + (declare (ignore value doc #-sb-xc-host name)) `(progn #-sb-xc-host - (defconstant ,@rest) + (defconstant ,@(cdr whole)) #+sb-xc-host ,(unless (eql (find-symbol (symbol-name name) :cl) name) - `(defconstant ,@rest)) - #+sb-xc-host - ,(let ((form `(sb!xc:defconstant ,@rest))) - (if (boundp '*delayed-def!constants*) - `(push ',form *delayed-def!constants*) - form)))) + `(defconstant ,@(cdr whole))) + #+sb-xc-host + ,(let ((form `(sb!xc:defconstant ,@(cdr whole)))) + (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."))))