Would it be possible to have a warning or note issued when a declaration is overridden due to the policy?  Many a head-scratching debugging has resulted when a global setting overrides a local one.  My experience with emacs programming for example is that I set a variable I think does what I want, and there is absolutely no effect because of some global setting I didn't realize took precedence. 

On 6/29/07, Nikodemus Siivola <nikodemus@random-state.net> wrote:
Nikodemus Siivola wrote:
> I have a patch that implements a way to globally restrict
> policicies in SBCL:
>
>   (restrict-compile-policy 'safety 1)
>
> will override any local declarations or global proclamations
> of SAFETY 0.

Patch:

  http://random-state.net/tmp/policy.patch

1.0.7.3.restrict-compiler-policy: RESTRICT-COMPILER-POLICY

  * Allow users to set a global minimum for optimization qualities,
    overriding declarations and proclamations.

    The intended use is to make it easy to recompile large bodies of
    code with many local optimization declarations with a minimum
    SAFETY or DEBUG everywhere.

  * Delete some unused functions: READ-SEQUENCE-OR-DIE,
    RENAME-KEY-ARGS.

  * Changes to SBCL itself to allow building with SBCL that has minimum
    safety set to 3:

     -- Second argument of %MORE-KW-ARG is a negative: DEFKNOWN it as a
        FIXNUM, not INDEX.

     -- We don't have a deftype for SB-VM::POSITIVE-FIXNUM -- it's only
        a backend type. Use (AND UNSIGNED-BYTE FIXNUM) instead.

I'll merge this soonish absent any cries of horror.

Cheers,

  -- Nikodemus


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel