98 | | === File options line can determine file's |
| 98 | === Limiting the extent of load-time OPTIMIZE proclamations === |
| 99 | A lot of publicly available Common Lisp code (and likely a lot of proprietary CL code as well) uses the idiom: |
| 100 | |
| 101 | {{{ |
| 102 | (declaim (optimize ''some set of OPTIMIZE settings'')) |
| 103 | }}} |
| 104 | |
| 105 | which is defined to be something like: |
| 106 | |
| 107 | {{{ |
| 108 | (eval-when (:compile-toplevel :load-toplevel :execute) |
| 109 | (proclaim '(optimize ''some set of OPTIMIZE settings''))) ; may manipulate the compilation environment in the :COMPILE-TOPLEVEL case. |
| 110 | }}} |
| 111 | |
| 112 | e.g., to have load-time as well as compile-time effects when the DECLAIM form is processed by COMPILE-FILE. |
| 113 | Load-time effects of OPTIMIZE proclamations are well-defined but rarely intended, and many implementations limit the extent of those effects so that they don't persist after LOAD returns. (At least one implementation that does so notes in its documentation that that behavior is not compliant with ANSI CL.) |
| 114 | |
| 115 | |
| 116 | |
| 117 | === File options line can determine file's EXTERNAL-FORMAT === |
| 118 | |