X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fpolicy.lisp;h=47becfd21b4ac2989bdc7e286bce45d8bd24b63a;hb=0794cd3908a441222f430ba0cf3bb7c3e1a96c63;hp=9ec12e3a9c4200c34e1aa32ac870819133c84dce;hpb=70c980b4c9285f4d518c80d314baac0da511c1bf;p=sbcl.git diff --git a/src/compiler/policy.lisp b/src/compiler/policy.lisp index 9ec12e3..47becfd 100644 --- a/src/compiler/policy.lisp +++ b/src/compiler/policy.lisp @@ -22,13 +22,6 @@ ;;; alists instead. (def!type policy () 'list) -;;; FIXME: the original implementation of this was protected by -;;; -;;; (eval-when (#-sb-xc-host :compile-toplevel :load-toplevel :execute) -;;; -;;; but I don't know why. This seems to work, but I don't understand -;;; why the original wasn't this in the first place. -- CSR, -;;; 2003-05-04 (defstruct policy-dependent-quality name expression @@ -37,8 +30,7 @@ ;;; 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) @@ -75,10 +67,14 @@ 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)) + ;;; On the cross-compilation host, we initialize immediately (not ;;; waiting for "cold init", since cold init doesn't exist on ;;; cross-compilation host). @@ -88,6 +84,7 @@ ;;; 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))