Commit 08395aae authored by pmai's avatar pmai
Browse files

Patch by Gerd Moellmann to turn old-style into new-style eval-when's in

the PCL code base.
parent 981ddb7f
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -24,12 +24,7 @@
;;; jeff morrill
;;; jmorrill@bbn.com

#+Genera
(eval-when (compile load eval)
  (import '(clos-internals::allocate-instance)))

#+cmu
(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)
  (import '(pcl:allocate-instance)))

(declaim (optimize (speed 3) (safety 3 #+nil 1) (space 0)
@@ -119,7 +114,7 @@
(declaim (single-float *speed-of-empty-loop*))
(defvar *speed-of-empty-loop*)

(eval-when (load eval)
(eval-when (:load-toplevel :execute)
  (setq *empty-iterations* (compute-empty-iterations))
  (setq *speed-of-empty-loop* (/ (empty-speed *empty-iterations*)
				 (float *empty-iterations*))))
+4 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
;;;

(ext:file-comment
 "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/boot.lisp,v 1.30 2002/08/27 18:46:48 pmai Exp $")
 "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/boot.lisp,v 1.31 2002/08/27 19:01:37 pmai Exp $")

(in-package :pcl)

@@ -98,7 +98,7 @@ work during bootstrapping.
;;; a separate piece of code because of a bug in ExCL which causes this not
;;; to work if it is inlined.
;;;
(eval-when (load eval)
(eval-when (:load-toplevel :execute)

(defun redirect-early-function-internal (real early)
  (setf (gdefinition real)
@@ -636,7 +636,7 @@ work during bootstrapping.

(declaim (ext:freeze-type fast-instance-boundp))

(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *allow-emf-call-tracing-p* nil)
(defvar *enable-emf-call-tracing-p* #-testing nil #+testing t)
)
@@ -2062,7 +2062,7 @@ work during bootstrapping.
		     (cons (if (listp arg) (car arg) arg) required)))))))


(eval-when (load eval)
(eval-when (:load-toplevel :execute)
  (setq *boot-state* 'early))

(defmacro with-slots (slots instance &body body)
+2 −2
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
;;;

(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/braid.lisp,v 1.22 2002/08/26 02:23:11 pmai Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/braid.lisp,v 1.23 2002/08/27 19:01:37 pmai Exp $")
;;;
;;; Bootstrapping the meta-braid.
;;;
@@ -580,7 +580,7 @@
	(setf (lisp:find-class name) lclass
	      (lisp:class-name lclass) name)))))

(eval-when (load eval)
(eval-when (:load-toplevel :execute)
  (clrhash *find-class*)
  (bootstrap-meta-braid)
  (bootstrap-accessor-definitions t)
+5 −5
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
;;;

(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/cache.lisp,v 1.15 2002/08/26 02:23:11 pmai Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/cache.lisp,v 1.16 2002/08/27 19:01:37 pmai Exp $")
;;;
;;; The basics of the PCL wrapper cache mechanism.
;;;
@@ -125,7 +125,7 @@
  '(integer 0    ;#.(position 'number wrapper-layout)
            7))  ;#.(position 'number wrapper-layout :from-end t)

(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun power-of-two-ceiling (x)
  (declare (fixnum x))
  ;;(expt 2 (ceiling (log x 2)))
@@ -280,7 +280,7 @@

; In CMUCL we want to do type checking as early as possible; structures help this.

(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defconstant wrapper-cache-number-vector-length
  kernel:layout-hash-length)
@@ -868,7 +868,7 @@
;;; to practically write my own compiler in order to get just this simple
;;; thing is something of a drag.
;;;
(eval-when (compile load eval)
(eval-when (:compile-toplevel :load-toplevel :execute)

(defvar *cache* nil)

@@ -1388,7 +1388,7 @@
;;; This preallocation only creates about 25% more caches than PCL itself
;;; uses.  Some ports may want to preallocate some more of these.
;;; 
(eval-when (load)
(eval-when (:load-toplevel)
  (dolist (n-size '((1 513)(3 257)(3 129)(14 128)(6 65)(2 64)(7 33)(16 32)
		    (16 17)(32 16)(64 9)(64 8)(6 5)(128 4)(35 2)))
    (let ((n (car n-size))
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
;;; the public domain, and is provided 'as is'.
;;;
(ext:file-comment
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/cmucl-documentation.lisp,v 1.7 1998/06/21 10:02:07 dtc Exp $")
  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/cmucl-documentation.lisp,v 1.8 2002/08/27 19:01:37 pmai Exp $")
;;;
;;; **********************************************************************
;;;
@@ -134,7 +134,7 @@

;;; Replace the minimal documentation function with the PCL version
;;; when loaded.
(eval-when (load)
(eval-when (:load-toplevel)
  (setf (symbol-function 'lisp:documentation) #'documentation)
  (setf (documentation 'documentation 'function)
    "Returns the documentation string of Doc-Type for X, or NIL if
Loading