;;; alists instead.
(def!type policy () 'list)
-(eval-when (#-sb-xc-host :compile-toplevel :load-toplevel :execute)
- (defstruct policy-dependent-quality
- name
- expression
- getter
- values-documentation))
+(defstruct policy-dependent-quality
+ name
+ expression
+ getter
+ values-documentation)
;;; names of recognized optimization policy qualities
(defvar *policy-qualities*) ; (initialized at cold init)
-(eval-when (:compile-toplevel :load-toplevel :execute)
- (defvar *policy-dependent-qualities* nil)) ; alist of POLICY-DEPENDENT-QUALITYs
+(defvar *policy-dependent-qualities* nil) ; alist of POLICY-DEPENDENT-QUALITYs
;;; Is X the name of an optimization policy quality?
(defun policy-quality-name-p (x)
inhibit-warnings))
(setf *policy*
(mapcar (lambda (name)
- ;; CMU CL didn't use 1 as the default for everything,
- ;; but since ANSI says 1 is the ordinary value, we do.
+ ;; CMU CL didn't use 1 as the default for
+ ;; everything, but since ANSI says 1 is the ordinary
+ ;; value, we do.
(cons name 1))
- *policy-qualities*)))
+ *policy-qualities*))
+ ;; not actually POLICY, but very similar
+ (setf *handled-conditions* nil
+ *disabled-package-locks* nil))
+
;;; On the cross-compilation host, we initialize immediately (not
;;; waiting for "cold init", since cold init doesn't exist on
;;; cross-compilation host).
;;; called by compiler code for known-valid QUALITY-NAMEs, e.g. SPEED;
;;; it's an error if it's called for a quality which isn't defined.
(defun policy-quality (policy quality-name)
+ (aver (policy-quality-name-p quality-name))
(let* ((acons (assoc quality-name policy))
(result (or (cdr acons) 1)))
result))