From: Stas B. <sta...@gm...> - 2015-05-30 20:30:37
|
"Douglas Katzman" <sn...@us...> writes: > The branch "master" has been updated in SBCL: > via 3bc42e1b0f77ba81f3c572e12cc210599224d754 (commit) > from 1a858eddae05d91998592c453787ffeec36f579e (commit) > > - Log ----------------------------------------------------------------- > commit 3bc42e1b0f77ba81f3c572e12cc210599224d754 > Author: Douglas Katzman <do...@go...> > Date: Fri May 29 16:41:27 2015 -0400 > > Return the advertised thing from SB-EXT:RESTRICT-COMPILER-POLICY. > --- > src/compiler/policy.lisp | 17 ++++++++++++----- > tests/compiler.impure.lisp | 16 ++++++++++++++++ > 2 files changed, 28 insertions(+), 5 deletions(-) > > diff --git a/src/compiler/policy.lisp b/src/compiler/policy.lisp > index 629a81c..3982497 100644 > --- a/src/compiler/policy.lisp > +++ b/src/compiler/policy.lisp > @@ -17,6 +17,13 @@ > ;;; global policy restrictions as a POLICY object or nil > (defvar *policy-restrictions* nil) > > +;;; ** FIXME: The check in ADVISE-IF-REPEATED-OPTIMIZE-QUALITIES fails > +;;; spuriously when you restrict the policy. > +;;; It asserts that you did not specify some quality value that is not the > +;;; effective value for the quality after processing all declarations, > +;;; because if it isn't, then there must have been an ignored duplicate. > +;;; So any value you specify other than the floor appears as if it got ignored. > + > (defun restrict-compiler-policy (&optional quality (min 0)) > #!+sb-doc > "Assign a minimum value to an optimization quality. QUALITY is the name of > @@ -47,7 +54,9 @@ EXPERIMENTAL INTERFACE: Subject to change." > (setf *policy-restrictions* (make-policy 0 0))) > (alter-policy *policy-restrictions* (policy-quality-name-p quality) > min (plusp min))) > - *policy-restrictions*) > + ;; Return dotted pairs, not elements that look declaration-like. > + (mapc (lambda (x) (rplacd x (cadr x))) > + (policy-to-decl-spec *policy-restrictions*))) This broke slime (sb-ext:restrict-compiler-policy ) without any restriction now gives The value NIL is not of type POLICY. 0: (POLICY-TO-DECL-SPEC NIL T NIL) -- With best regards, Stas. |