Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 723830890bac44da3d113209b14e090b > files > 623

sbcl-1.0.31-1mdv2010.0.i586.rpm

<html lang="en">
<head>
<title>The Processing Path - SBCL 1.0.31 User Manual</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="SBCL 1.0.31 User Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Understanding-Compiler-Diagnostics.html#Understanding-Compiler-Diagnostics" title="Understanding Compiler Diagnostics">
<link rel="prev" href="The-Original-and-Actual-Source.html#The-Original-and-Actual-Source" title="The Original and Actual Source">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--

     This manual is part of the SBCL software system. See the `README'
     file for more information.

     This manual is largely derived from the manual for the CMUCL
     system, which was produced at Carnegie Mellon University and later
     released into the public domain. This manual is in the public
     domain and is provided with absolutely no warranty. See the
     `COPYING' and `CREDITS' files for more information.
   -->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="The-Processing-Path"></a>
<p>
Previous:&nbsp;<a rel="previous" accesskey="p" href="The-Original-and-Actual-Source.html#The-Original-and-Actual-Source">The Original and Actual Source</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Understanding-Compiler-Diagnostics.html#Understanding-Compiler-Diagnostics">Understanding Compiler Diagnostics</a>
<hr>
</div>

<!-- node-name,  next,  previous,  up -->
<h5 class="subsubsection">4.1.3.3 The Processing Path</h5>

<p><a name="index-Processing-Path-41"></a><a name="index-Macroexpansion-42"></a><a name="index-Source_002dto_002dsource-transformation-43"></a>
The processing path is mainly useful for debugging macros, so if you
don't write macros, you can probably ignore it. Consider this example:

<pre class="lisp">     (defun foo (n)
       (dotimes (i n *undefined*)))
</pre>
   <p>Compiling results in this error message:

<pre class="example">     ; in: DEFUN FOO
     ;     (DOTIMES (I N *UNDEFINED*))
     ; --&gt; DO BLOCK LET TAGBODY RETURN-FROM
     ; ==&gt;
     ;   (PROGN *UNDEFINED*)
     ;
     ; caught WARNING:
     ;   undefined variable: *UNDEFINED*
</pre>
   <p>Note that <code>do</code> appears in the processing path. This is because
<code>dotimes</code> expands into:

<pre class="lisp">     (do ((i 0 (1+ i)) (#:g1 n))
         ((&gt;= i #:g1) *undefined*)
       (declare (type unsigned-byte i)))
</pre>
   <p>The rest of the processing path results from the expansion of
<code>do</code>:

<pre class="lisp">     (block nil
       (let ((i 0) (#:g1 n))
         (declare (type unsigned-byte i))
         (tagbody (go #:g3)
           #:g2    (psetq i (1+ i))
           #:g3    (unless (&gt;= i #:g1) (go #:g2))
           (return-from nil (progn *undefined*)))))
</pre>
   <p>In this example, the compiler descended into the <code>block</code>,
<code>let</code>, <code>tagbody</code> and <code>return-from</code> to reach the
<code>progn</code> printed as the actual source. This is a place where the
&ldquo;actual source appears in explanation&rdquo; rule was applied. The
innermost actual source form was the symbol <code>*undefined*</code> itself,
but that also appeared in the explanation, so the compiler backed out
one level.

   </body></html>