X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fcold-init-helper-macros.lisp;h=bed148ff9fb045ea1ee437a426dbdf63013aecd6;hb=0f3a5f2e8886d18d0b4f6485c38a42be629422ae;hp=f34c5d918cd0638e99aa8bd4059073e663f25d99;hpb=5ec8d0c1c8b7939818b75118b472fac1af554f9a;p=sbcl.git diff --git a/src/code/cold-init-helper-macros.lisp b/src/code/cold-init-helper-macros.lisp index f34c5d9..bed148f 100644 --- a/src/code/cold-init-helper-macros.lisp +++ b/src/code/cold-init-helper-macros.lisp @@ -20,11 +20,11 @@ (defvar *cold-init-forms*)) (defmacro !begin-collecting-cold-init-forms () - #-sb-xc-host '(eval-when (:compile-toplevel :execute) - (when (boundp '*cold-init-forms*) - (warn "discarding old *COLD-INIT-FORMS* value")) - (setf *cold-init-forms* nil)) - #+sb-xc-host nil) + #+sb-xc '(eval-when (:compile-toplevel :execute) + (when (boundp '*cold-init-forms*) + (warn "discarding old *COLD-INIT-FORMS* value")) + (setf *cold-init-forms* nil)) + #-sb-xc nil) ;;; Note: Unlike the analogous COLD-INIT macro in CMU CL, this macro ;;; makes no attempt to simulate a top level situation by treating @@ -33,24 +33,24 @@ ;; In the target Lisp, stuff the forms into a named function which ;; will presumably be executed at the appropriate stage of cold load ;; (i.e. basically as soon as possible). - #-sb-xc-host (progn - (setf *cold-init-forms* - (nconc *cold-init-forms* (copy-list forms))) - nil) + #+sb-xc (progn + (setf *cold-init-forms* + (nconc *cold-init-forms* (copy-list forms))) + nil) ;; In the cross-compilation host Lisp, cold load might not be a ;; meaningful concept and in any case would have happened long ago, ;; so just execute the forms at load time (i.e. basically as soon as ;; possible). - #+sb-xc-host `(let () ,@forms)) + #-sb-xc `(progn ,@forms)) (defmacro !defun-from-collected-cold-init-forms (name) - #-sb-xc-host `(progn - (defun ,name () - ,@*cold-init-forms* - (values)) - (eval-when (:compile-toplevel :execute) - (makunbound '*cold-init-forms*))) - #+sb-xc-host (declare (ignore name))) + #+sb-xc `(progn + (defun ,name () + ,@*cold-init-forms* + (values)) + (eval-when (:compile-toplevel :execute) + (makunbound '*cold-init-forms*))) + #-sb-xc (declare (ignore name))) ;;; FIXME: Consider renaming this file asap.lisp, ;;; and the renaming the various things