Diff of /standards.xmlf [c13f92] .. [614bb1] Maximize Restore

  Switch to side-by-side view

--- a/standards.xmlf
+++ b/standards.xmlf
@@ -21,6 +21,129 @@
  <para>The following sections are organized following the structure in the
  online version of the standard &HyperSpec;: each chapter complements the one
  with the same name in the standard.</para>
+</chapter>
+
+<chapter id="ansi.evaluation-and-compilation">
+ <title>Evaluation and compilation</title>
+
+ <section id="ansi.declarations">
+  <title>Declarations</title>
+
+  <section id="ansi.declarations.optimize">
+   <title><function>OPTIMIZE</function></title>
+
+   <para>The <function>OPTIMIZE</function> declaration includes three concepts:
+   <function>DEBUG</function>, <function>SPEED</function>,
+   <function>SAFETY</function> and <function>SPACE</function>. Each of these
+   declarations can take one of the integer values 0, 1, 2 and 3. According to
+   these values, the implementation may decide how to compie or interpret a
+   given lisp form.</para>
+
+   <para>&ECL; currently does not use all these declarations, but some of them
+   definitely affect the speed and behavior of compiled functions. For
+   instance, the <function>DEBUG</function> declaration, as shown in <xref
+   linkend="table.optimize.debug"/>, if the value of debugging is zero, the
+   function will not appear in the debugger and, if redefined, some functions
+   might not see the redefinition.</para>
+
+   <table id="table.optimize.debug">
+    <title>Behavior for different leves of DEBUG</title>
+    <tgroup cols="5">
+     <thead>
+      <row>
+       <entry>Behavior</entry>
+       <entry>0</entry>
+       <entry>1</entry>
+       <entry>2</entry>
+       <entry>3</entry>
+      </row>
+     </thead>
+     <tbody>
+      <row>
+       <entry>Compiled functions in the same source file are called
+       directly</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+      </row>
+      <row>
+       <entry>Compiled function appears in debugger backtrace</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+      </row>
+      <row>
+       <entry>All functions get a global entry, that is, SI:C-LOCAL is
+       ignored.</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+      </row>
+     </tbody>
+    </tgroup>
+   </table>
+
+   <para>A bit more critical is the value of <function>SAFETY</function>
+   because as shown in Table <xref linkend="table.optimize.safety"/>, it may
+   affect the safety checks generated by the compiler. In particular, in some
+   circumstances the compiler may assume that the arguments to a function are
+   properly typed. For instance, if you compile with a low value of
+   <function>SAFETY</function>, and invoke <function>RPLACA</function>, the
+   consequences are unspecified.</para>
+
+   <table id="table.optimize.safety">
+    <title>Behavior for different leves of SAFETY</title>
+    <tgroup cols="5">
+     <thead>
+      <row>
+       <entry>Behavior</entry>
+       <entry>0</entry>
+       <entry>1</entry>
+       <entry>2</entry>
+       <entry>3</entry>
+      </row>
+     </thead>
+     <tbody>
+      <row>
+       <entry>The value of an expression or a variable declared by the user is
+       assumed to be right.</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+      </row>
+      <row>
+       <entry>Arguments to a function are assumed to have the proper
+       types.</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+      </row>
+      <row>
+       <entry>The slots of a structure are accessed directly, without checking
+       the types.</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+      </row>
+      <row>
+       <entry>Functions and variables are assumed to be bound.</entry>
+       <entry>Y</entry>
+       <entry>Y</entry>
+       <entry>N</entry>
+       <entry>N</entry>
+      </row>
+     </tbody>
+    </tgroup>
+   </table>
+
+  </section>
+ </section>
 </chapter>
 
 <chapter id="ansi.data-and-control">