Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e3d62627d1d1aab7ab1be2dd7f65a872 > files > 315

ecl-10.4.1-1.fc14.x86_64.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>4.5.&#160;Inspecting generated C code</title><link rel="stylesheet" href="ecl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="ch27.html" title="Chapter&#160;4.&#160;The compiler"><link rel="prev" href="ch27s04.html" title="4.4.&#160;Use of Declarations to Improve Efficiency"><link rel="next" href="ch28.html" title="Chapter&#160;5.&#160;Porting ECL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.5.&#160;Inspecting generated C code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch27s04.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;4.&#160;The compiler</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch28.html">Next</a></td></tr></table><hr></div><div class="section" title="4.5.&#160;Inspecting generated C code"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Internals-Inspecting-generated-C-code"></a>4.5.&#160;Inspecting generated C code</h2></div></div></div><p>Common-Lisp defines a function disassemble, which is
  supposed to disassemble a compiled function and to display the
  assembler code.  According to <span class="emphasis"><em>Common-Lisp: The Language</em></span>,</p><p><span class="emphasis"><em>This is primary useful for debugging the compiler</em></span>, ..\\</p><p>This is, however, <span class="emphasis"><em>useless</em></span> in our case, because we are
  not concerned with assembly language.  Rather, we are interested in
  the C code generated by the <span class="application">ECL</span> compiler.  Thus the disassemble
  function in <span class="application">ECL</span> accepts not-yet-compiled functions only and displays
  the translated C code.</p><pre class="screen">
   &gt; (defun add1 (x) (1+ x))
   ADD1
   &gt; (disassemble *)
   ;;; Compiling (DEFUN ADD1 ...).
   ;;; Emitting code for ADD1.

   /*      function definition for ADD1                                  */
   static L1(int narg, object V1)
   { VT3 VLEX3 CLSR3
   TTL:
   VALUES(0) = one_plus((V1));
   RETURN(1);
   }
  </pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch27s04.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch27.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch28.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.4.&#160;Use of Declarations to Improve Efficiency&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;5.&#160;Porting <span class="application">ECL</span></td></tr></table></div></body></html>